Method offor signaling image information, and method offor decoding image information using same

ABSTRACT

The present invention relates to a method offor signaling information on a prediction mode and to a method of for decoding image information using same. According to the present invention, the method offor signaling prediction mode information, serving according to the present invention, as a method offor signaling image information, includes performing prediction on a current block and signaling the prediction-type information applied to the current block. The signaling of the information includes joint-coding and components of signaling information components constituting the prediction-type information. According to the present invention, overhead may be reduced when information on a prediction is signaled.

CROSS RELATED APPLICATIONS

This application is a continuation of International ApplicationPCT/KR2011/008949, filed Nov. 23, 2011, which claims priority from U.S.Provisional Application Nos. 61/417,265, filed Nov. 25, 2010,61/418,876, filed Dec. 2, 2010, 61/421,193, filed Dec. 8, 2010,61/432,601, filed Jan. 14, 2011 and 61/441,655, filed Feb. 11, 2011. Thedisclosures of the prior applications are considered part of (and areincorporated by reference in) the disclosure of this application.

TECHNICAL FIELD

The present invention relates to image information compressiontechnology, and more particularly, to a method of signaling informationon a prediction mode and a method of decoding image information usingthe same.

BACKGROUND ART

The need for images having high resolution and high quality has recentlybeen increasing in various fields. As the resolution and quality of animage is improved, however, the amount of data in the image is alsolikewise increased. Accordingly, if image data is transmitted using amedium such as an existing wired/wireless broadband line, or image datais stored using an existing storage medium, the costs of transmittingand storing data are also increased. In order to effectively transmit,store, and play information within an image having high resolution andhigh quality, image compression technology utilizing high efficiency canbe used.

In order to improve image compression efficiency, inter-prediction andintra-prediction can be used. In the inter-prediction method, the pixelvalues within a current picture are predicted using as a reference theinformation found in other pictures. In the intra-prediction method, thepixel values of a current picture are predicted using the correlationbetween pixels within the same picture.

Meanwhile, as entropy coding method, there are a method usingcontext-based adaptive binary arithmetic coding (CABAC) and a methodusing context-based adaptive variable length coding (CAVLC).

In the CABAC method, a probability model for each syntax element isselected depending on context, the probability values of the probabilitymodel being changed through internal statistics, and compression isperformed using arithmetic coding. Alternatively, if CAVLC is used as anentropy coding model, coding is performed on each syntax element using avariable length coding (VLC) table.

DISCLOSURE Technical Problem

The present invention provides a signaling method and apparatus capableof reducing transmission overhead.

The present invention also provides a method and apparatus for signalinginformation on a prediction type that is applied to a current blockthrough joint coding.

The present invention also provides a method and apparatus fordetermining signaling order by taking the frequency of occurrence ofeach prediction type into consideration.

The present invention also provides a method and apparatus forallocating a codeword for a prediction type by taking the frequency ofoccurrence of each prediction type into consideration.

The present invention also provides a method and apparatus for adaptinga codeword for a prediction type by taking the frequency of occurrenceof each prediction type into consideration.

The present invention also provides a method and apparatus foreffectively selecting a most probable mode (MPM) in order to increasecompression efficiency and prediction effect.

Technical Solution

(1) An embodiment of the present invention relates to a method ofsignaling video information, including performing prediction on acurrent block and signaling information on a prediction type applied tothe current block, wherein signaling the information on the predictiontype may include jointly coding information elements forming theinformation on the prediction type and signaling the jointly-codedinformation elements.

(2) In (1), the information elements may include information onprediction mode and information on partition size.

(3) In (2), the information elements may include at least one ofinformation on whether a block has been partitioned or not andinformation on a slice type.

(4) In (1), a short codeword may be allocated to a prediction typehaving a high selection ratio by way of joint coding.

(5) In (1), whether a specific prediction type from among multipleprediction types which are applicable to the current block is applied ornot may be separately signaled using a flag.

(6) In (5), the specific prediction type may be a skip mode.

(7) In (5), the specific prediction type may include a skip mode and amerge mode, wherein whether the skip mode is applied to the currentblock or not may be preferentially signaled, and whether the merge modeis applied to the current block or not may be signaled if an applicationof an inter-prediction mode to the current block is signaled.

(8) In (5), a short codeword may be allocated to a prediction typehaving a high selection ratio by way of joint coding.

(9) Another embodiment of the present invention relates to a method ofdecoding video information, including receiving information, performingprediction on a current block based on the received information, andreconstructing the current block based on the prediction, wherein thereceived information comprises information elements which are jointlycoded and the information elements form a prediction type applied to thecurrent block.

(10) In (9), the information elements may include information onprediction mode and information on partition size.

(11) In (10), the information elements may include at least one ofinformation on whether a block has been partitioned or not andinformation on a slice type.

(12) In (9), a short codeword may be allocated to a prediction typehaving a high frequency of occurrence, from among multiple predictiontypes, by way of joint coding.

(13) In (9), whether a specific prediction type from among multipleprediction types which are applicable to the current block is applied ornot may be received as separate information using a flag.

(14) In (13), the specific prediction type may include a skip mode andmerge mode, information on whether the skip mode is applied to thecurrent block or not may be preferentially received, and information onwhether the merge mode is applied to the current block or not may bereceived if application of an inter-prediction mode to the current blockis signaled.

Advantageous Effects

In accordance with the present invention, overhead can be reduced wheninformation on prediction is signaled.

In accordance with the present invention, signaling overhead can bereduced by performing joint coding on information on a prediction typethat is applied to a current block.

In accordance with the present invention, transmission efficiency can beimproved by determining the signaling order or allocating a codewordtaking the frequency of occurrence of each prediction type intoconsideration.

In accordance with the present invention, transmission overhead and theamount of bits transmitted can be reduced by adapting a codeword for aprediction type by taking the frequency of occurrence of each predictiontype into consideration.

In accordance with the present invention, compression efficiency andprediction effects can be improved by effectively selecting a mostprobable mode (MPM).

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram schematically showing a video coding apparatus(or encoder) in accordance with an embodiment of the present invention.

FIG. 2 is a block diagram schematically showing a video decoder inaccordance with an embodiment of the present invention.

FIG. 3 schematically shows an example of a method of signalinginformation for prediction when merge mode is performed in a CU unit.

FIG. 4 is a diagram schematically showing the frequency of occurrence ofeach prediction type.

FIG. 5 is a diagram schematically illustrating an example of a method inwhich the encoder performs signaling in a system to which the presentinvention is applied.

FIG. 6 is a diagram schematically illustrating another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied.

FIGS. 7 and 8 are diagrams schematically illustrating other examples ofa method in which the encoder performs signaling in a system to whichthe present invention is applied.

FIG. 9 schematically shows an example of a method of signalinginformation on prediction when a merge mode is performed in a PU unit.

FIG. 10 is a diagram schematically showing the frequency of occurrenceof each prediction type when a merge mode is applied in a PU unit.

FIG. 11 is a diagram schematically illustrating an example of a methodin which the encoder performs signaling in a system to which the presentinvention is applied.

FIG. 12 is a diagram schematically illustrating another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied.

FIG. 13 is a diagram schematically illustrating yet another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied.

FIG. 14 schematically shows an example of a decoding process.

FIG. 15 is a diagram illustrating a prediction mode decoding process ina decoding process.

FIG. 16 is a diagram schematically illustrating an example of a methodof signaling prediction mode and partition information through jointcoding.

FIG. 17 is a diagram schematically illustrating an example of a casewhere bits are wasted due to a codeword allocated to partition modebeing lengthened.

FIG. 18 is a diagram schematically illustrating an example of adaptationreset in which partition mode is the object of the reset and the largestcoding unit (LCU) is a reset unit in a system to which the presentinvention is applied.

FIG. 19 is a diagram schematically illustrating a codeword adaptationmethod.

FIG. 20 is a diagram schematically illustrating an example of neighborreference blocks for adaptation in a system to which the presentinvention is applied.

FIG. 21 is a diagram schematically illustrating an embodiment of amethod of changing adaptation in a system in which the present inventionis applied.

FIG. 22 is a diagram schematically illustrating an example of anintra-prediction method for the current block.

FIG. 23 is a diagram schematically illustrating an example of a methodfor determining a most probable mode (MPM) when some of MPM candidatesare valid in a system to which the present invention is applied.

FIG. 24 is a diagram schematically illustrating the extension of MPMcandidates in a system to which the present invention is applied.

FIG. 25 is a flowchart schematically illustrating an operation of theencoder in a system to which the present invention is applied.

FIG. 26 is a diagram schematically illustrating an operation of thedecoder in a system to which the present invention is applied.

MODE FOR INVENTION

The present invention may be modified in various ways, and the presentinvention may have several embodiments. Specific embodiments of thepresent invention are illustrated in the drawings and described indetail. However, the present invention is not limited only to thespecific embodiments given. The terms used in this specification areused to describe only the specific embodiments and are not intended torestrict the technical scope of the present invention. An expressionreferencing a singular value additionally refers to a correspondingexpression of the plural number, unless explicitly limited otherwise bythe context. In this specification, terms such as “comprise” or ‘have”,are intended to designate those characteristics, numbers, steps,operations, elements, or parts which are described in the specification,or any combination of them that exist, and it should be understood thatthey do not preclude the possibility of the existence or possibleaddition of one or more additional characteristics, numbers, steps,operations, elements, or parts, or combinations thereof.

Meanwhile, elements in the drawings described in the present inventionare independently illustrated for convenience of description regardingthe different characteristics and functions of video coding and decodingapparatuses, but this does not indicate that each of the elements isimplemented using separate hardware or separate software. For example,two or more of the elements may be combined to form one element, and oneelement may be divided into a plurality of elements. It is to be notedthat embodiments in which some elements are integrated into one combinedelement and/or an element is separated into multiple separate elementsare included in the scope of the present invention, given that they donot depart from the essence of the present invention.

Hereinafter, some exemplary embodiments of the present invention aredescribed in detail with reference to the accompanying drawings.Hereinafter, the same reference numerals will designate the sameelements throughout the drawings, and redundant description of the sameelements is omitted.

FIG. 1 is a block diagram schematically showing a video encodingapparatus (or encoder) in accordance with an embodiment of the presentinvention. Referring to FIG. 1, the video coding apparatus 100 includesa picture partition module 105, a prediction module 110, a transformmodule 115, a quantization module 120, a reordering module 125, anentropy coding module 130, an inverse quantization module 135, aninverse transform module 140, a filter module 145, and memory 150.

The picture partition module 105 may partition an input picture into oneor more processing units. The processing unit may be a prediction unit(hereinafter referred to as a ‘PU’), a transform unit (hereinafterreferred to as a ‘TU’), or a coding unit (hereinafter referred to as a‘CU’).

The prediction module 110 includes an inter prediction module forperforming inter-prediction and an intra prediction module forperforming intra-prediction, as will be described later. The predictionmodule 110 generates a prediction block by performing prediction on theprocessing unit of a picture output from the picture partition module105. The processing unit of the picture in the prediction module 110 maybe a CU, a TU, or a PU. Furthermore, the prediction module 110 maydetermine whether prediction performed on a corresponding processingunit is inter-prediction or intra-prediction and determine the detailedcontent (e.g., prediction mode) of each prediction method. Here, theprocessing unit on which prediction is performed, and the processingunit on which the prediction method and detailed contents are determinedmay be different types of units. For example, the prediction method andprediction mode may be determined in a PU unit, and prediction may beperformed in a TU unit.

The prediction block may be generated by performing the prediction basedon information on at least one of a picture anterior to the currentpicture and/or a picture posterior to the current picture throughinter-prediction. Furthermore, the prediction block may be generated byperforming the prediction based on information on pixels within thecurrent picture by way of intra-prediction.

In inter-prediction, a reference picture for a PU may be selected, and ablock having the same size as the PU may be selected as a referenceblock in an integer pixel sample unit. Next, as for the current PU, aprediction block that has a minimum residual signal and has a minimummotion vector size is generated. A skip mode, merge mode, or motionvector prediction (MVP) may be used for the inter prediction method. Theprediction block may be generated in a sample unit smaller than aninteger, such as a ½ pixel unit and a ¼ pixel unit. Here, the motionvector may be represented in a unit smaller than an integer pixel. Forexample, a luma pixel may be represented in a ¼ pixel unit, and a chromapixel may be represented in a ⅛ pixel unit.

Pieces of information on the index of the reference picture, a motionvector (e.g., a motion vector predictor), and a residual signal selectedthrough inter-prediction are entropy coded and signaled to a decoder.

If intra-prediction is performed, a prediction mode may be determined ina PU unit and prediction may be performed in a PU unit. Furthermore, aprediction mode may be determined in a PU unit and intra-prediction maybe performed in a TU unit.

In intra-prediction, a prediction mode may be one of 33 directionalprediction modes and two or more non-directional modes. Thenon-directional modes may include DC prediction modes and planar modes.

In intra-prediction, a prediction block may be generated according tothe prediction mode after an adaptive intra smoothing (AIS) filterapplied to a reference pixel. The types of AIS filter applied to thereference pixel may be different. Furthermore, in intra-prediction,prediction may be performed according to the prediction mode of thecurrent block interpolating the reference pixel in a ⅛ pixel unit.

A PU can have a variety of sizes and forms. For example, in the case ofinter-prediction, a PU may have a size such as 2N×2N, 2N×N, N×2N, orN×N. In the case of intra-prediction, a PU may have a size such as 2N×2Nor N×N (N being an integer in the above two examples). Here, a PU havingthe N×N size may be set to be exclusively applied to a specified case.For example, a PU having any given N×N size may be used only for aminimum size coding unit or may be used only in the case ofintra-prediction. In addition to the PUs having the above-describedsizes, a PU having a size, such as N×mN, mN×N, 2N×mN, or mN×2N (m<1),may be further defined and used.

A residual value (or a residual block or a residual signal) between thegenerated prediction block and an original block is input to thetransform module 115. Furthermore, information on prediction mode,information on the motion vector, etc. that are used for the predictionare coded, together with the residual value, in the entropy codingmodule 130 and signaled to the decoder.

The transform module 115 may performs transformation on the residualblock in the transform unit and generates transform coefficients. Theunit of transform in the transform module 115 may be a TU, and thetransform unit may have a quad tree structure. Here, the size of thetransform unit may be determined within a predetermined range havingmaximum and minimum values. The transform module 115 may transform theresidual block using discrete cosine transform (DCT) and/or discretesine transform (DST).

The quantization module 120 may generate quantization coefficients byquantizing the residual values transformed by the transform module 115.The quantization coefficients generated by the quantization module 120are provided to the inverse quantization module 135 and the reorderingmodule 125.

The reordering module 125 reorders the quantization coefficientsprovided by the quantization module 120. By reordering the quantizationcoefficients, coding efficiency in the entropy coding module 130 can beimproved. The reordering module 125 may reorder the quantizationcoefficients of a two-dimensional block form to quantizationcoefficients of a one-dimensional vector form using a coefficientscanning.

The reordering module 125 may change the order of coefficient scanningbased on the probability statistics of the quantization coefficientstransmitted by the quantization module 120, so that entropy codingefficiency in the entropy coding module 130 can be improved.

The entropy coding module 130 may perform entropy coding on thequantization coefficients reordered by the reordering module 125. Anentropy coding method, such as exponential Golomb, context-adaptivevariable length coding (CAVLC), or context-adaptive binary arithmeticcoding (CABAC), may be used in the entropy coding. The entropy codingmodule 130 may encode various pieces of information received from thereordering module 125 and the prediction module 110, such as informationon the quantization coefficients and block type of a CU, information onprediction mode, information on a partition unit, information on a PU,information on a signaling unit, information on a motion vector,information on a reference picture, information on the interpolation ofa block, and information on filtering.

Furthermore, the entropy coding module 130 may apply a specific changeto a received parameter set or syntax as needed.

The inverse quantization module 135 performs inverse quantization on thevalues quantized by the quantization module 120, and the inversetransform module 140 performs inverse transform on the values inverselyquantized by the inverse quantization module 135. The residual valuesgenerated from the inverse quantization module 135 and the inversetransform module 140 may be added to the prediction block predicted bythe prediction module 110, thereby being capable of generating areconstructed block.

The filter module 145 may apply a deblocking filter, an adaptive loopfilter (ALF), or a sample adaptive offset (SAO) to a reconstructedpicture.

The deblocking filter may remove block distortion occurring at theboundary of the blocks in the reconstructed picture. The ALF may performfiltering based on a comparison of the reconstructed image, after theblock is filtered by the deblocking filter, with the original image. TheALF may be utilized only in instances of high efficiency. The SAO mayrestore an offset (difference) between the residual block to which thedeblocking filter has been applied and the original picture in a pixelunit, and the SAO may be applied in the form of a band offset or an edgeoffset.

Meanwhile, the filter module 145 may not apply filtering on areconstructed block used in inter-prediction.

The memory 150 may store the reconstructed block or picture output fromthe filter module 145. The reconstructed block or picture stored in thememory 150 may be provided to the prediction module 110 for performinginter-prediction.

FIG. 2 is a block diagram schematically showing a video decoder inaccordance with an embodiment of the present invention. Referring toFIG. 2, the video decoder 200 can include an entropy decoding module210, a reordering module 215, an inverse quantization module 220, aninverse transform module 225, a prediction module 230, a filter module235, and memory 240.

When an image bit stream is received from the encoder, the input bitstream may be decoded according to a procedure by which videoinformation has been processed by the encoder.

For example, if variable length coding (hereinafter referred to as‘VLC’), such as CAVLC, has been used in order for the encoder to performentropy coding, the entropy decoding module 210 may perform entropydecoding by implementing the same VLC table as that used in the encoder.Furthermore, if the encoder has used CABAC in order to perform entropycoding, the entropy decoding module 210 may perform entropy decodingusing CABAC.

Information for generating a prediction block from among pieces ofinformation decoded by the entropy decoding module 210, may be providedto the prediction module 230. Residual values on which entropy decodinghas been performed by the entropy decoding module may be input to thereordering module 215.

The reordering module 215 may reorder the bit stream on which entropydecoding has been performed by the entropy decoding module 210 based ona reordering method used in the encoder. The reordering module 215 mayreorder coefficients represented in a one-dimensional vector form byreconstructing the coefficients into coefficients of a two-dimensionalblock form. The reordering module 215 may receive information related tocoefficient scanning performed by the encoder and perform reorderingusing an inverse scanning method based on a scanning order performed bythe corresponding encoding unit.

The inverse quantization module 220 may perform inverse quantizationbased on quantization parameters and coefficient values of a blockprovided by the encoder.

As to DCT and DST performed by the transform module of the encoder, theinverse transform module 225 may perform inverse DCT and/or inverse DSTon quantization results performed by the encoder. Inverse transform maybe performed in a transmission unit or a partition unit of a picture asdetermined by the encoder. In the transform module of the encoder, DCTand/or DST may be selectively performed based on a plurality of factors,such as a prediction method, the size of the current block, and aprediction direction. The inverse transform module 225 of the videodecoder may perform inverse transform based on transform information forthe transform of the transform module in encoder.

The prediction module 230 may generate a prediction block based oninformation related to the generation of the prediction block providedby the entropy decoding module 210 and information on a previouslydecoded block and/or picture provided by memory 240. A reconstructedblock may be generated using the prediction block generated by theprediction module 230 and the residual block provided by the inversetransform module 225. If the prediction mode used for the current PU isan intra-prediction mode, intra-prediction for generating a predictionblock may be performed based on the information on pixels within thecurrent picture.

If prediction mode for the current PU is inter-prediction mode,inter-prediction for the current PU may be performed based oninformation on at least one of a picture anterior to the current pictureand a picture posterior to the current picture. Here, motion informationnecessary for the inter prediction for the current PU provided by theencoder, for example, information on a motion vector and a referencepicture index, etc., may be derived corresponding to the informationsuch as a skip flag or merge flag signaled from the encoder afterchecking the skip flag or the merge flag.

The reconstructed block and/or picture may be provided to the filtermodule 235. The filter module 235 may apply deblocking filtering, asample adaptive offset (SAO) and/or adaptive loop filtering to thereconstructed block and/or picture.

The memory 240 may store the reconstructed picture or block so that thereconstructed picture or block may be used as a reference picture or areference block and may also supply the reconstructed picture to anoutput unit.

Meanwhile, when prediction is performed by the encoder, information onprediction, for example, information on prediction mode and partition issignaled to the decoder. The signaling of information related toprediction may be performed by various methods. For example, wheninformation related to prediction is signaled, information on the modeby which the motion information of a neighboring block which neighborsthe current block (a neighboring block that neighbors the current block'is hereinafter referred to as a ‘neighboring block’, for convenience ofdescription) is used as motion information for the current block mya besignaled prior to other information on the prediction as to the currentblock.

A method of using motion information on a neighboring block as motioninformation on the current block includes a method using a skip mode, adirect mode, or a merge mode. Motion information is not directlytransmitted because the motion information of a neighboring block isused as motion information for the current block in all the three modes.However, residual information is not transmitted in a skip mode, whereasresidual information may be transmitted in a direct mode and a mergemode. In a skip mode and a merge mode, however, information indicatingthat motion information on which neighboring block will be used asmotion information for the current block may be transmitted.

A method of using (merge) skip mode or merge mode may be taken intoconsideration as another method of using information of a neighboringblock for the prediction of the current block. In (merge) skip mode, oneof candidate blocks neighboring the current block is selected and motioninformation of the selected block may be used as motion information forthe current block, but a residual signal is not transmitted. Like in(merge) skip mode, in merge mode, one of candidate blocks neighboringthe current block is selected and motion information of the selectedblock may be used as motion information for the current block, butresidual information is in this case transmitted. Here, the residualinformation may be information on the difference between the pixel valueof the current block and the pixel value of a prediction block that isgenerated based on a reference block indicated by the motion informationof the selected block. If (merge) skip mode or merge mode is utilized,information indicating of which candidate block the current block usesmotion information may be transmitted.

Although motion information of a neighboring block is not used as motioninformation for the current block, motion information of the currentblock may be predicted using motion information from the neighboringblock. For example, the encoder may signal to the decoder information ofthe motion vector difference indicating a difference between the motionvector of the current block and the motion vector of a neighboringblock, and the decoder may predict the motion information of the currentblock based on motion information from the neighboring block and theinformation provided by the encoder about the motion vector difference.

If mode does not correspond to skip mode, direct mode, or merge modewhen the three modes are available, the encoder informs the decoder ofprediction mode and partition information of the current block. If mergemode is performed in a CU unit, the encoder may not sigal to the decoderprediction mode and partition information of the current block. If mergemode is performed in a PU unit, the encoder may signal prediction modeand partition information of the current block to the decoder.

Even when (merge) skip mode or merge mode are performed, the sameprocessing as that in skip mode, direct mode, or merge mode may beperformed. For example, if mode does not correspond to (merge) skip modeand merge mode, the encoder may signal to the decoder both predictionmode and partition information for the current block. If merge mode isperformed in a CU unit, the encoder may not signal to the decoderprediction mode and partition information of the current block. If mergemode is performed in a PU unit, however, the encoder may signal to thedecoder prediction mode and partition information of the current block.

Accordingly, the encoder may signal to the decoder prediction mode andpartition information for the current block except in a case wheremotion information on a neighboring block is not used as motioninformation on the current block in a CU unit.

FIG. 3 schematically shows an example of a method of signalinginformation on prediction when merge mode is performed in a CU unit.FIG. 3 illustrates an example in which {skip mode, direct mode, mergemode} is used as mode in which motion information from a neighboringblock is used as motion information for the current block.

Referring to FIG. 3, whether skip mode is applied to the current blockor not may be indicated by a skip flag skip_flag, and whether merge modeis applied to the current block or not may be indicated by a merge flagmerge_flag. Furthermore, whether direct mode is applied to the currentblock or not may be indicated by signaled information such as signalingdirect_mode_signaling. If a prediction mode other than skip mode, mergemode, and direct mode is applied, prediction mode and partitioninformation may be indicated through information, such aspred_mode_partition_signaling.

In the example of FIG. 3, first, whether prediction mode of the currentblock is skip mode or not can be determined by the skip flag skip_flag.For example, if the value of the skip_flag is 1, it can be determinedthat skip mode is applied to the current block. If the value of theskip_flag is 0, whether prediction mode of the current block is mergemode or not can be determined by the merge flag merge_flag. For example,if the value of the merge_flag is 1, it can be determined that mergemode is applied to the current block. If the value of the merge_flag is0, whether prediction mode of the current block is direct mode or notcan be determined by the signal direct_mode_signaling that indicateswhether the prediction mode of the current block is direct mode or not.For example, if the value of the signal direct_mode_signaling is 1, itcan be determined that direct mode is applied to the current block. Ifthe value of the signal direct_mode_signaling is 0, prediction mode andpartition information for the current block can be determined by theinformation disclosed by pred_mode_partition_signaling, which indicatesthe prediction mode and partition information for the current block.Here, the prediction mode and the partition information (e.g., apartition size) for the current block may be subject to joint coding ata time and subsequently signaled.

Information on prediction, such as prediction mode and a partition size,that is, prediction type, can be subject to joint coding and signaled asdescribed above. Prediction mode may include intra mode and inter mode.The partition size may include 2N×2N and N×N (N being the number ofsamples) with regard to intra-prediction mode and may include 2N×2N,2N×N, N×2N, N×N, 2N×nU, 2N×nD, nL×2N, and nR×2N (wherein 0<n<1 and eachof U, D, L, and R is an integer indicating the number of samples)regarding inter-prediction mode.

Accordingly, a prediction type that can be indicated by the informationpred_mode_partition_signaling may be the prediction type that has anyone of the partitions {2N×2N, N×N} with intra-prediction mode or theprediction type that has any one of the partitions {2N×2N, 2N×N, N×2N,N×N, 2N×nU, 2N×nD, nL×2N, nR×2N} with inter-prediction mode.

Meanwhile, information on a prediction type, including information onprediction mode and partition, can be transmitted before and after thesignaling of other pieces of information.

For example, information on a prediction type may be signaled after aslice type slice_type of the current block is signaled. If predictionmode of the current block is intra mode, information on a slice type mayindicate an I slice. If prediction mode of the current block is intermode, information on a slice type may indicate a B or P slice. The Islice refers to a slice decoded using only intra prediction, and the Bslice refers to a slice decoded using either intra prediction or interprediction that uses at most two motion vectors and reference indices.The P slice refers to a slice decoded using intra-prediction orinter-prediction that uses at most one motion vector and referenceindex.

Furthermore, information on a prediction type may be signaled after thesignaling of whether the current block has been split or not(IntraSplitFlag). For example, if information on a prediction type istransmitted as a parameter regarding a CU, information indicating thatthe current block has not been split (IntraSplitFlag=0) or informationindicating that the current block has been split (IntraSplitFlag=1) istransmitted and information on a prediction type may be thentransmitted.

Accordingly, although the same index or the same codeword is allocatedto the prediction types in which at least one of prediction mode andpartition size is the same, the prediction type to be indicated may bespecified based on information of a previously transmitted slice typeand/or partition. For example, although same index or same codeword isallocated to 2N×2N intra prediction mode and 2N×2N inter predictionmode, the decoder may determine whether 2N×2N intra prediction mode hasbeen indicated or whether 2N×2N inter prediction mode has been indicatedbecause it has been previously signaled that a slice type is an 1 slicein the case of intra mode and it has been previously signaled that aslice type is a P or B slice in the case of inter mode.

Meanwhile, information on prediction mode in which motion information ofa neighboring block is used as motion information for the current block,such as {skip mode, direct mode, merge mode} or {(merge) skip mode,merge mode}, as described above may be signaled separately without beingsubject to joint coding with information concerning another predictiontype.

Furthermore, in the case of merge mode from among modes in which motioninformation of a neighboring block is used as motion information for thecurrent block, information on whether of merging or not may be jointlycoded with other pieces of information for mergence having a highfrequency of occurrence and information on whether of merging or not maybe signaled separately for mergence having a low frequency of occurrencewithout being jointly coded with other pieces of information, by takingfrequency of occurrence into consideration. For example, only in thecase of merging in a CU unit (i.e., CU mergence), information of themerging may be jointly coded with information on whether of applyingintra/inter-prediction, and partition information, etc. and subsequentlysignaled. In the case of merging in a PU unit (i.e., PU mergence),information on whether of merging or not may be transmitted separatelywithout being jointly coded with information on intra/inter-predictionand partition information, etc. A case where merging is performed in aCU unit and a case where merging is performed in a PU unit areseparately described below.

Table 1 shows an example in which prediction mode and partitioninformation for the current block are jointly coded according to theexample shown in FIG. 3. For convenience of description, table 1illustrates a case of the prediction types in which inter-predictionmode has one of the partitions {2N×2N, 2N×N, N×2N, N×N}.

TABLE 1 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 01 N × 2N 001

Referring to Table 1, the encoder may indicate which prediction mode isapplied to the current block and which partition size the current blockhas through a codeword according to joint coding.

Meanwhile, if information on specific mode is first signaled andinformation on prediction mode and a partition size is then signaled asin FIG. 3 and Table 1, a codeword can be allocated by taking thefrequency of occurrence of each prediction type into consideration.

FIG. 4 is a diagram schematically showing the frequency of occurrence ofeach prediction type. FIG. 4 shows distributions of skip mode, mergemode, direct mode, the partition sizes of intra mode, and the partitionsizes of inter mode in environments, that is, random access highefficiency (RAHE), low delay high efficiency (LDHE), random access lowcomplexity (RALC), and low delay low complexity (LDLC).

Referring to FIG. 4, it can be seen that skip mode and merge mode havesignificant distributions of frequency of occurrence and direct mode hasa smaller frequency of occurrence than 2N×2N inter prediction mode. Inthis case, in the signaling order shown in FIG. 3, it can be moreefficient to signal information on whether 2N×2N inter prediction modeis applied or not prior to signal information on whether direct mode isapplied or not.

In the example of FIG. 4, {skip mode, direct mode, merge mode} is usedas the prediction mode in which motion information of a neighboringblock is used as motion information for the current block and thefrequency of occurrence of each of the partitions 2N×2N, 2N×N, N×2N, andN×N is measured. As in a case where {(merge) skip mode, merge mode} isused and/or all the partition sizes are used, each of the predictionmodes and frequency of occurrence of can be taken into consideration,and the signaling order may be adjusted based on the consideration.

FIG. 5 is a diagram schematically illustrating an example of a method inwhich the encoder performs signaling in a system to which the presentinvention is applied. FIG. 5 illustrates an example in which {skip mode,direct mode, merge mode} is used as prediction mode in which motioninformation on a neighboring block is used as motion information on thecurrent block and merge mode is applied in a CU unit as in FIG. 3.Accordingly, regarding each partition size smaller than a coding unit(CU), information as for whether merge mode is applied or not is notsignaled.

Referring to FIG. 4, a prediction mode/partition size having a higherselection ratio (i.e., frequency of occurrence) than direct mode may bepresent. Accordingly, when transmission overhead is considered, it canbe advantageous to provide signaling information, so that whetheranother prediction mode (i.e., a prediction mode/partition size) havinga higher selection ratio is applied or not can be determined first.

For example, assuming that a prediction mode/partition size having ahigher frequency of occurrence than direct mode is mode A, informationon whether mode A is applied or not may be transmitted prior toinformation on whether direct mode is applied or not.

In the example of FIG. 5, the encoder signals information on whethermode A is applied or not prior to information on whether direct mode isapplied or not. In particular, the encoder first signals the skip flagskip_flag indicating whether skip mode is applied to the current blockor not. The encoder may signal the merge flag merge_flag indicatingwhether merge mode is applied or not in the case where the skip mode isnot applied, and signal information modeA_flag indicating whether mode Ais applied or not in the case where the merge mode is not applied.

If mode A is not applied, the encoder signals information indicatingwhether which one of the remaining prediction modes/partition sizes anddirect mode is applied to the current block. That is, the encodersignals information pred_mode_partition_signaling indicating whatprediction type is applied to the current block besides skip mode, mergemode, and mode A.

Table 2 shows an example of a joint coding table in which a codeword isallocated to information on a prediction type according to the exampleof FIG. 5. Table 2 illustrates an example of prediction types in whichinter-prediction mode can be applied with one of the partitions {2N×2N,2N×N, N×2N, N×N} and merge mode is applied in a CU unit, for convenienceof description.

TABLE 2 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N 00000N × N 00001 INTER N × N 0001 2N × N 01 N × 2N 001

In the example of Table 2, it is assumed that mode A is 2N×2N intermode, for convenience of description. Accordingly, information on 2N×2Ninter prediction mode is first signaled without using the joint codingtable, and information indicating whether direct mode is applied or notis signaled using the joint coding table together with other predictiontypes.

In addition to changing transmission order by taking the frequency ofoccurrence of a prediction type into consideration as in the example ofFIG. 5, the codewords may be allocated to the prediction types by takingthe frequency of occurrence of each prediction type into consideration.

Table 3 shows an example of a joint coding table in which a codeword isallocated by taking the frequency of occurrence of each prediction typeinto consideration. Table 3 illustrates an example of prediction typesin which inter-prediction mode can be applied with one of the partitions{2N×2N, 2N×N, N×2N, N×N} and merge mode is applied in a CU unit, forconvenience of description.

TABLE 3 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 001 N × 2N 01

In the example of Table 3, it is assumed that 2N×N inter prediction modehas a higher frequency of occurrence than N×2N inter prediction mode,for convenience of description. As compared with the case of Table 1, inTable 3, codewords allocated to 2N×N inter prediction mode and N×2Ninter prediction mode are changed by taking the frequency of occurrenceof a prediction type into consideration. In particular, assuming that2N×N inter prediction mode has a lower frequency of occurrence than N×2Ninter prediction mode, a shorter codeword 01 is allocated to N×2N interprediction mode, which has a higher frequency of occurrence and a longercodeword 001 is allocated to 2N×N inter prediction mode, which has alower frequency of occurrence.

Here, the frequency of occurrence of a prediction type may beincorporated into both the signaling order and the allocation of thecodewords.

Table 4 shows an example of a joint coding table in a case where asignaling order is adjusted and codewords are allocated by taking thefrequency of occurrence of a prediction type into consideration. Table 4illustrates an example of prediction types in which inter-predictionmode can be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N}and merge mode is applied in a CU unit, for convenience of description.

TABLE 4 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N 00000N × N 00001 INTER N × N 0001 2N × N 001 N × 2N 01

In the example of Table 4, it is assumed that 2N×2N inter predictionmode has a higher frequency of occurrence than direct mode and N×2Ninter prediction mode has a higher frequency of occurrence than 2N×Ninter prediction mode, for convenience of description. Accordingly,information indicating whether 2N×2N inter prediction mode is applied issignaled prior to information indicating whether direct mode is applied.Information indicating whether direct mode is applied or not issignaled, together with other prediction types, using the joint codingtable of Table 4. Here, a codeword 01, being smaller than the codeword001 of 2N×N inter prediction mode, is allocated to N×2N inter predictionmode, which has a higher frequency of occurrence than 2N×N interprediction mode.

Meanwhile, regarding specific prediction mode from among predictionmodes in which motion information of a neighboring block is used asmotion information for the current block, information on whether thespecific prediction mode is applied may be signaled separately, andinformation on whether other prediction types are applied may besignaled through joint coding. Accordingly, whether skip mode is appliedor not can be signaled separately, and whether merge mode is applied andwhether direct mode is applied can be signaled through joint codingalong with information on whether other prediction types are applied. Insome embodiments, whether merge mode is applied may be signaledseparately, and whether skip mode is applied and whether direct mode isapplied may be signaled through joint coding along with information onwhether other prediction types are applied. Likewise, whether directmode is applied or not may be signaled separately, and whether skip modeis applied and whether merge mode is applied may be signaled throughjoint coding along with whether other prediction types are applied.

Furthermore, whether skip mode is applied and whether merge mode isapplied can be signaled separately, and whether direct mode is appliedcan be signaled through joint coding along with whether other predictiontypes are applied. Whether skip mode is applied and whether direct modeis applied can be signaled separately, and whether merge mode is appliedcan be signaled through joint coding along with whether other predictiontypes are applied. In some embodiments, whether merge mode is appliedand whether direct mode is applied can be signaled separately, andwhether skip mode is applied can be signaled through joint coding alongwith whether other prediction types are applied.

Even in a case where {merge skip mode, merge mode} is used instead of{skip mode, direct mode, merge mode}, whether skip merge mode is appliedcan be signaled separately and whether merge mode is applied can besignaled through joint coding along with whether other prediction typesare applied. In some embodiments, whether merge mode is applied can besignaled separately, and whether (merge) skip mode is applied can besignaled through joint coding along with whether other prediction typesare applied.

Table 5 shows an example of a joint coding table that is used to signalwhether specific prediction mode, from among prediction modes in whichmotion information on a neighboring block is used as motion informationon the current block, is applied and whether other prediction types areapplied. Table 5 illustrates an example in which whether direct mode isapplied is signaled through joint coding along with whether otherprediction types are applied in a case where {skip mode, direct mode,merge mode} is used. Table 5 illustrates an example of prediction typein which inter-prediction mode can be applied with the partitions{2N×2N, 2N×N, N×2N, N×N} and merge mode is applied in a CU unit, forconvenience of description.

TABLE 5 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N 000000N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N 001 N × 2N 0001

Referring to Table 5, the encoder may indicate a prediction type for thecurrent block by sending a codeword corresponding to the prediction typeapplied to the current block.

At this time, the encoder may allocate the codeword depending on thefrequency of occurrence of each prediction type.

Table 6 shows an example of a joint coding table in which codewords areallocated by taking frequency of occurrence into consideration, assumingthat 2N×2N inter prediction mode has a higher frequency of occurrencethan direct mode.

TABLE 6 PREDICTION MODE PARTITION CODEWORD DIRECT 01 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 1 2N × N 001 N × 2N 0001

Referring to Table 6, a codeword 1, being smaller than the codeword 01of direct mode, is allocated to 2N×2N inter prediction mode, which has ahigher frequency of occurrence.

Table 7 shows an example in which codewords are allocated by takingfrequency of occurrence into consideration, assuming that 2N×N interprediction mode, from among the other inter prediction modes, has alower frequency of occurrence than N×2N inter prediction mode.

TABLE 7 PREDICTION MODE PARTITION CODEWORD DIRECT 01 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 1 2N × N 0001 N × 2N 001

Referring to Table 7, a codeword 1, being smaller than a codeword 01allocated to direct mode, is allocated to 2N×2N inter prediction modehaving a higher frequency of occurrence, and a codeword 001, beingsmaller than a codeword 0001 allocated to 2N×N inter prediction mode, isallocated to N×2N inter prediction mode.

FIG. 6 is a diagram schematically illustrating another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied. FIG. 6 illustrates an example in whichdirect mode is not applied as prediction mode in which motioninformation of a neighboring block is used as motion information for thecurrent block, that is, {(merge) skip mode, merge mode} is used, andmerge mode is applied in a CU unit. Accordingly, whether merge mode isapplied is not signaled per each partition size smaller than a CU.

When comparing the embodiment of FIG. 6 with the embodiment of FIG. 3 or5, the number of pieces of information on whether prediction modes inwhich motion information of a neighboring block is used as motioninformation for the current block is applied is reduced by one. That is,it can be said that the embodiment of FIG. 3 or 5 corresponds to a casewhere there is no direct mode. If direct mode is excluded in theembodiment of FIG. 3 or 5, it can be said that signaling overhead forsubsequent signaling on inter/intra prediction modes is reduced.Accordingly, if (merge) skip mode and merge mode are used as in the caseof FIG. 6, signaling overhead can be reduced as compared with the casedemonstrated by FIG. 3 or 5.

Even when {(merge) skip mode, merge mode} is used, a prediction type canbe signaled identical to the case where {skip mode, direct mode, mergemode} is used. For example, even in the case of FIG. 6, assuming thatprediction mode or a prediction type having a high selection ratio (orfrequency of occurrence) is mode A, as indicated from among predictiontypes other than (merge) skip mode and merge mode, informationmodeA_flag on whether mode A is applied can be signaled prior toinformation is signaled regarding whether other prediction types e.g.2N×2N inter prediction mode, . . . , N×N intra prediction mode areapplied. Furthermore, if mode A is not applied, whether other predictiontypes e.g. 2N×2N inter prediction mode, . . . , N×N intra predictionmode are applied can be signaled through joint coding.

Table 8 shows an example of a joint coding table in which a codeword isallocated to information on a prediction type based on the example ofFIG. 6. Table 8 illustrates an example in which inter-prediction modecan be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N} andmerge mode is applied in a CU unit, for convenience of description.

TABLE 8 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N 0001INTER N × N 001 2N × N 1 N × 2N 01

In the example of Table 8, it is assumed that a prediction type havingthe highest frequency of occurrence, from among inter prediction modeswith one of the partitions 2N×2N, 2N×N, N×2N, and N×N, that is, mode A,is 2N×2N inter prediction mode, for convenience of description.Accordingly, whether 2N×2N inter prediction mode is applied istransmitted in advance through separate signaling.

In addition to the case where transmission order is determined by takingthe frequency of occurrence of a prediction type into consideration asin the example of FIG. 6, codeword may be allocated to the predictiontype by taking the frequency of occurrence (or a selection ratio) intoconsideration.

Table 9 shows an example of a joint coding table in which codewords areallocated by taking the frequency of occurrence of a prediction typeinto consideration, in a case where {(merge) skip mode, merge mode} isused. Table 9 illustrates an example in which inter prediction mode canbe applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N} and mergemode is applied in a CU unit, for convenience of description.

TABLE 9 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 001 N × 2N 01

Referring to Table 9, a shorter codeword is allocated to N×2N interprediction mode, assuming that N×2N inter prediction mode has a higherfrequency of occurrence than 2N×N inter prediction mode.

Furthermore, even when {(merge) skip mode, merge mode} is used, thefrequency of occurrence of a prediction type can be incorporated intoboth the signaling order and the allocation of the codewords.

Table 10 shows an example of a joint coding table in which signalingorder is adjusted and codewords are allocated by taking the frequency ofoccurrence of a prediction type into consideration, as in a case where{(merge) skip mode, merge mode} is used. Table 10 illustrates an exampleof prediction type in which inter prediction mode can be applied withone of the partitions {2N×2N, 2N×N, N×2N, N×N} and merge mode is appliedin a CU unit, for convenience of description.

TABLE 10 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N0001 INTER N × N 001 2N × N 01 N × 2N 1

In the example of Table 10, it is assumed that 2N×2N inter predictionmode, from among 2N×2N, 2N×N, N×2N, N×N inter prediction modes, has thehighest frequency of occurrence and 2N×N inter prediction mode has ahigher frequency of occurrence than N×2N inter prediction mode, forconvenience of description. Accordingly, at first whether (merge) skipmode is applied, whether merge mode is applied, and whether 2N×2N interprediction mode is applied may be signaled through separate signalings,and whether other prediction types are applied is signaled using thejoint coding table of Table 10. Here, a codeword 1 being smaller thanthe codeword 01 of 2N×N inter prediction mode is allocated to N×2N interprediction mode, which has a higher frequency of occurrence than 2N×Ninter prediction mode.

Meanwhile, if {skip mode, direct mode, merge mode} is used as predictionmodes in which motion information of a neighboring block is used asmotion information for the current block, direct mode and merge mode maybe integrated and used. Direct mode and merge mode are similar to eachother in that motion information is derived from a neighboring blockand, unlike skip mode, residual information is transmitted. If directmode and merge mode are integrated, signaling overhead for signalinginformation on whether inter/intra prediction modes are applied, whichis signaled after signaling information on whether mode in which directmode and merge mode are integrated (hereinafter referred to as‘integration mode’, for convenience of description) is applied, can bereduced. Even when integration mode is applied, signaling order may beadjusted and the allocation of codewords may be adjusted as describedabove.

FIGS. 7 and 8 are diagrams schematically illustrating other examples ofa method in which the encoder performs signaling in a system to whichthe present invention is applied. FIGS. 7 and 8 illustrate examples inwhich integration mode is used, but merge mode is applied in a CU unit.Accordingly, whether merge mode is applied is not signaled per eachpartition size smaller than a CU.

In the example of FIG. 7, if skip mode is not applied after thesignaling of whether skip mode is applied, information on whether aprediction type having the highest frequency of occurrence from amongthe remaining prediction types is applied may be preferentiallysignaled.

In FIG. 7, mode A is assumed to be a prediction type having the highestfrequency of occurrence among the remaining prediction types, excludingskip mode. Accordingly, the encoder signals whether mode A is applied ornot if skip mode is not applied and the encoder signals which one of theremaining prediction types (including a prediction mode/partition size)will be applied through joint coding, e.g.pred_mode_partition_signaling, if mode A is not applied.

Table 11 shows a joint coding table according to the example of FIG. 7.

TABLE 11 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 01 N × 2N 001

In the examples of FIG. 7 and Table 11, if skip mode is not appliedafter signaling of whether skip mode is applied or not, whetherintegration mode is applied can be signaled as a prediction type havingthe highest frequency of occurrence. If integration mode is not applied,which prediction type is applied can be signaled using a result in whichpieces of information on the prediction modes and partition of theremaining prediction types are jointly coded, as in Table 11. Meanwhile,FIG. 7 and Table 11 illustrate that a prediction type having the highestfrequency of occurrence is integration mode except skip mode, but thisis only an example for convenience of description. The present inventionis not limited to the above example. For example, if 2N×2N interprediction mode has a higher frequency of occurrence than integrationmode, 2N×2N inter prediction mode may be determined as mode A. In thiscase, after whether 2N×2N inter prediction mode is applied or not issignaled, whether integration mode is applied or not may be signaledthrough joint coding along with other prediction types.

Unlike FIG. 7, FIG. 8 illustrates a method of separately signalingwhether integration mode is applied or not (merge_direct_flag) inadvance if skip mode is not applied, and separately signaling on whethera prediction type (i.e., mode A) having the highest frequency ofoccurrence from among other prediction types (modeA_flag) in advance ifintegration mode is not applied. If mode A is not applied, which one ofother prediction modes is applied is signaled through joint coding(pred_mode_partition_signaling) as in FIG. 7.

Table 12 shows a joint coding table according to the example of FIG. 8.

TABLE 12 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N0001 INTER N × N 001 2N × N 1 N × 2N 01

In the example of Table 12, it is assumed that 2N×2N inter predictionmode is mode A, for convenience of description. Accordingly, whether2N×2N inter prediction mode is applied or not can be separately signaledin advance.

Meanwhile, if joint coding is performed separately from the adjustingthe signaling order as described above, codewords can be applied bytaking the frequency of occurrence (or a selection ratio) of eachprediction type.

Table 13 shows an example of a joint coding table in which codewords areallocated by taking the frequency of occurrence of a prediction typeinto consideration, in a case where integration mode is used. Table 13illustrates an example of prediction type in which inter prediction modecan be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N} andmerge mode is applied in a CU unit, for convenience of description.

TABLE 13 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 001 N × 2N 01

Table 13 illustrates an example in which N×2N inter prediction mode hasa higher frequency of occurrence than 2N×N inter prediction mode.Accordingly, in the example of Table 13, a codeword 01 is allocated toN×2N inter prediction mode, being shorter than a codeword 001 allocatedto 2N×N inter prediction mode.

Furthermore, signaling order may be adjusted as in FIG. 8 and a codewordmay be allocated as in Table 13 by taking the frequency of occurrence ofeach prediction type into consideration.

Table 14 shows an example of a joint coding table in which signalingorder is adjusted and codewords are allocated by taking the frequency ofoccurrence of a prediction type into consideration, in a case whereintegration mode is used. Table 14 illustrates an example of predictiontype in which inter prediction mode can be applied with one of thepartitions {2N×2N, 2N×N, N×2N, N×N} and merge mode is applied in a CUunit, for convenience of description.

TABLE 14 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N0001 INTER N × N 001 2N × N 01 N × 2N 1

In the example of Table 14, it is assumed that prediction modecorresponding to mode A of FIG. 8 is 2N×2N inter prediction mode andN×2N inter prediction mode has a higher frequency of occurrence than2N×N inter prediction mode, for convenience of description. Accordingly,if integration mode is not applied after whether integration mode isapplied or not is signaled, whether 2N×2N inter mode is applied or notis signaled through separate signaling. Furthermore, a codeword 1 isallocated to N×2N inter prediction mode, being shorter than a codeword01 allocated to 2N×N inter prediction mode.

Furthermore, even when integration mode is used, which prediction typefrom among prediction types except skip mode is applied may be signaledconcurrently through joint coding (pred_mode_partition_signaling). Thatis, a codeword can be allocated to each of prediction types includingintegration mode, and a codeword corresponding to an applied predictiontype can be signaled.

Table 15 schematically shows an example of a joint coding table that isused to send information on a prediction type (e.g., prediction mode anda partition size) applied to the current block by allocating a codewordto each of prediction types other than skip mode, in a case whereintegration mode is used.

TABLE 15 PREDICTION MODE PARTITION CODEWORD MRG/DIRECT 1 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N 001 N × 2N 0001

Table 15 illustrates an example in which inter prediction mode can beapplied with one of the partitions {2N×2N, 2N×N, N×2N, N×N} and mergemode is applied in a CU unit, for convenience of description. Referringto Table 15, the encoder may allocate a codeword to each of predictionmodes, that is, integration mode (i.e., merge/direct mode), 2N×2N andN×N intra prediction modes, and 2N×2N, 2N×N, N×2N, and N×N interprediction modes, and sends the codeword of the prediction type appliedto the current block.

Here, the encoder may allocate the codewords by taking the frequency ofoccurrence of each prediction type (or a selection ratio) intoconsideration.

Table 16 shows an example in which codewords are allocated by taking thefrequency of occurrence of each prediction type into consideration inthe example of Table 15.

TABLE 16 PREDICTION MODE PARTITION CODEWORD MERGE/DIRECT 1 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N 0001 N × 2N 001

In the example of Table 16, it is assumed that N×2N inter predictionmode has a higher frequency of occurrence than 2N×N inter predictionmode, for convenience of description. Accordingly, unlike in the exampleof Table 15, in the example of Table 16, a codeword 001 is allocated toN×2N inter prediction mode, being shorter than a codeword 0001 allocatedto 2N×N inter prediction mode.

Only cases where the partitions {2N×2N, 2N×N, N×2N, N×N} are applied tointer mode have been described in the aforementioned examples, forconvenience of description, but a prediction type for the current blockmay be signaled by taking all the partitions for inter mode intoconsideration.

Table 17 shows an example of a joint coding table that can be used tosignal a prediction block for the current block in a case where allpartitions 2N×2N, 2N×N, N×2N, N×N, 2N×nU, 2N×nD, nL×2N, and nR×2N aretaken into consideration.

TABLE 17 pred_type PredMode PartMode 0 MODE_INTRA PART_2N × 2N 1MODE_INTRA PART_N × N 0 MODE_INTER PART_2N × 2N 1 MODE_INTER PART_2N × N2 MODE_INTER PART_N × 2N 3 MODE_INTER PART_N × N 4 MODE_INTER PART_2N ×nU 5 MODE_INTER PART_2N × nD 6 MODE_INTER PART_nL × 2N 7 MODE_INTERPART_nR × 2N 8 MODE_INTRA PART_2N × 2N 9 MODE_INTRA PART_N × N

Referring to Table 17, each partition size of intra prediction mode andeach partition size of inter prediction mode can be indicated through aprediction type. Accordingly, prediction mode and a partition size maybe jointly coded, and a prediction type for the current block may besignaled at once. Here, codewords may be allocated by taking frequencyof occurrence into consideration for each prediction type as describedabove.

Meanwhile, in the example of Table 17, in the case of prediction mode inwhich motion information of a neighboring block is used as motioninformation for the current block without change, for example, in thecase of {skip mode, direct mode, merge mode} or {(merge) skip mode,merge mode}, which mode is applied may be inferred based on otherconditions or which mode is applied or not may have been sent priorthrough separate signaling. In addition, in the example of Table 17, itis assumed that merge mode is applied in a CU unit as in theabove-described examples, and whether merge mode is applied or not isnot again signaled for each partition.

Furthermore, prior to the signaling of each prediction type, pieces ofadditional information described above, such as information on a slicetype or partition, may be signaled. In this case, the prediction typesmay be distinguished from one another based on the pieces of additionalinformation. For example, in the case of an I slice, 2N×2N intraprediction mode may be indicated if the value of a prediction type is 0.In the case of a B or P slice, 2N×2N inter prediction mode may beindicated if the value of a prediction type is 0.

Furthermore, the prediction types may be distinguished from one anotherby allocating different codewords to prediction types having differentprediction modes/partitions.

Meanwhile, the case where merge mode is applied in a CU unit have beendescribed so far, but merge mode may be applied in a PU unit. Forexample, in each of the examples described so far, the features of thepresent invention described in the above examples can be applied withoutchange to a case where merge mode is performed in a PU unit by signalingwhether merge mode is applied to each of the partitions of interprediction mode.

Methods of applying the present invention when merge mode is performedin a PU unit are described in detail below.

FIG. 9 schematically shows an example of a method of signalinginformation on prediction when merge is performed in a PU unit. FIG. 9illustrates an example in which {skip mode, direct mode, merge mode} isused as prediction mode in which motion information of a neighboringblock is used as motion information for the current block.

In the example of FIG. 9, unlike in the example of FIG. 3, if skip modeand direct mode are not applied, which inter prediction mode andpartition are applied to the current block is indicated and whether thepartition is merged or not is signaled. Whether skip mode and directmode are applied or not is separately signaled in advance, and whichprediction mode/partition to be applied if skip mode and direct mode arenot applied is signaled by jointly coding the indication of predictionmode and information on a partition size. Whether merge mode is appliedto each partition with inter prediction is indicated through merge mode.Here, inter prediction mode performed when merge mode is not applied isreferred to as normal inter mode, for convenience of description.

Table 18 shows an example in which prediction mode information andpartition information for the current block are jointly coded accordingto the example of FIG. 9. Table 18 illustrates an example in which interprediction mode can be applied with one of the partitions {2N×2N, 2N×N,N×2N, N×N}, for convenience of description.

TABLE 18 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 01 N × 2N 001

Referring to Table 18, the encoder can inform the decoder of aprediction type applied to the current block by signaling a codeword.

Meanwhile, if information on specific mode is first signaled andinformation on prediction mode and a partition size is then signaled asin FIG. 9 and Table 18, a codeword may be allocated by taking thefrequency of occurrence of each prediction type into consideration.

FIG. 10 is a diagram schematically showing the frequency of occurrenceof each prediction type when merge mode is applied in a PU unit. FIG. 10shows distributions of skip mode, merge mode, direct mode, and thepartition sizes of intra prediction mode and the partition sizes ofinter prediction mode in the case of RAHE, LDHE, RALC, and LDLC.

Referring to FIG. 10, skip mode has a significant frequencydistribution, and direct mode has a lower frequency of occurrence than2N×2N inter prediction mode. In this case, it will be more efficient tosignal information indicating whether 2N×2N inter prediction mode isapplied or not than to signal information indicating whether direct modeis applied or not as per the signaling order shown in FIG. 9.

In the example of FIG. 10, {skip mode, direct mode, merge mode} was usedand the frequencies of occurrence of 2N×2N, 2N×N, N×2N, N×N from amongpartition sizes were measured. However, even when {(merge) skip mode,merge mode} is used and/or all partition sizes are used, the frequencyof occurrence of each prediction mode and partition size can be takeninto consideration and signaling order can be adjusted based on theconsideration.

FIG. 11 is a diagram schematically illustrating an example of a methodin which the encoder performs signaling in a system to which the presentinvention is applied. In FIG. 11, {skip mode, direct mode, merge mode}is used as prediction mode in which motion information of a neighboringblock is used as motion information for the current block.

Referring to FIG. 10, a prediction mode/partition size having a higherselection ratio (or frequency of occurrence) than direct mode may bepresent. Accordingly, when transmission overhead is considered, it canbe advantageous to provide signaling information, so that whether otherprediction mode (i.e., a prediction mode/partition size) having a higherselection ratio is applied or not can be determined first.

For example, assuming that a prediction mode/partition size having ahigher frequency of occurrence than direct mode is mode A, informationon whether mode A is applied or not can be transmitted prior toinformation on whether direct mode is applied or not.

To this end, in the example of FIG. 11, the encoder signals informationon whether mode A is applied or not prior to information on whetherdirect mode is applied. In particular, the encoder first signalsinformation skip_flag indicating whether skip mode is applied to thecurrent block or not and then signals information modeA_flag indicatingwhether mode A is applied or not if skip mode is not applied.

If mode A is not applied, the encoder signals informationpred_mode_partition_signaling indicating which one of the remainingprediction modes/partition sizes is applied to the current block alongwith direct mode.

Table 19 shows an example of a joint coding table in which a codeword isapplied to information on a prediction type according to the example ofFIG. 11. Table 19 illustrates an example in which inter prediction modecan be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N}, forconvenience of description.

TABLE 19 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N 00000N × N 00001 INTER N × N 0001 2N × N 01 N × 2N 001

In the example of Table 19, it is assumed that mode A is 2N×2N interprediction mode, for convenience of description. Accordingly, 2N×2Ninter preediction mode is first signaled without using the joint codingtable, and whether direct mode is applied or not is signaled using thejoint coding table together with other prediction types.

Meanwhile, unlike in the case where the transmission order is changed bytaking the frequency of occurrence of a prediction type intoconsideration as in the example of FIG. 11, a codeword may be allocatedto a prediction type by taking the frequency of occurrence of aprediction type into consideration.

Table 20 shows a joint coding table in which codewords are allocated bytaking the frequency of occurrence of each prediction type intoconsideration. Table 20 illustrates an example in which inter predictionmode can be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N},for convenience of description.

TABLE 20 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N 001 N × 2N 01

In the example of Table 20, it is assumed that N×2N inter predictionmode has a higher frequency of occurrence than 2N×N inter predictionmode, for convenience of description. In the case of Table 20, codewordsallocated to 2N×N inter prediction mode and N×2N inter prediction modeare changed by taking the frequency of occurrence of a prediction typeinto consideration. In particular, assuming that 2N×N inter predictionmode has a lower frequency of occurrence than N×2N inter predictionmode, a shorter codeword 01 may be allocated to N×2N inter predictionmode, having a higher frequency of occurrence, and a longer codeword 001may be allocated to 2N×N inter prediction mode, having a lower frequencyof occurrence.

Here, the frequency of occurrence of a prediction type may beincorporated into both the signaling order and the allocation of thecodewords.

Table 21 shows an example of a joint coding table in which signalingorder is adjusted and codewords are allocated by taking the frequency ofoccurrence of a prediction type into consideration. Table 21 illustratesan example in which inter prediction mode can be applied with one of thepartitions {2N×2N, 2N×N, N×2N, N×N}, for convenience of description.

TABLE 21 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N 00000N × N 00001 INTER N × N 0001 2N × N 001 N × 2N 01

In the example of Table 21, it is assumed that 2N×2N inter predictionmode has a higher frequency of occurrence than direct mode and N×2Ninter prediction mode has a higher frequency of occurrence than 2N×Ninter prediction mode, for convenience of description. Accordingly,whether 2N×2N inter prediction mode is applied or not may be transferredthrough separate signaling prior to whether direct mode is applied ornot. Whether direct mode is applied or not may be signaled, togetherwith other prediction types, using the joint coding table of Table 21.Here, a codeword 01 is allocated to N×2N inter prediction mode, having ahigher frequency of occurrence than 2N×N inter prediction mode, thecodeword 01 being smaller than a codeword 001 allocated to 2N×N interprediction mode.

Meanwhile, even when merge mode is performed in a PU unit as describedabove, information on whether specific prediction mode, from amongprediction modes in which motion information on a neighboring block isused as motion information on the current block, is applied or not maybe first signaled separately and information on whether other predictiontype is applied or not may be signaled through joint coding. Forexample, whether skip mode in {skip mode, direct mode, merge mode} or{(merge) skip mode, merge mode} is applied or not can be separatelysignaled in advance, and whether direct mode or merge mode is applied ornot can be signaled through joint coding along with whether theremaining prediction types are applied.

Table 22 shows an example in which whether direct mode is appliedissignaled through joint coding together with whether other predictiontypes are applied, in a case where {skip mode, direct mode, merge mode}is used. In particular, whether any one of prediction types for directmode and inter prediction mode/intra prediction mode is applied or notis not signaled through a flag, but the prediction types for direct modeand inter prediction mode/intra prediction mode are applied or not areseparately signaled concurrently through a codeword allocated to aprediction type including direct mode. Table 22 illustrates an examplein which inter prediction mode can be applied with one of the partitions{2N×2N, 2N×N, N×2N, N×N}, for convenience of description.

TABLE 22 PREDICTION MODE PARTITION CODEWORD DIRECT 1 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N  001  N × 2N0001

Referring to Table 22, the encoder can indicate a prediction type forthe current block by sending a codeword corresponding to the predictiontype applied to the current block.

Here, the encoder may allocate a codeword depending on the frequency ofoccurrence of each prediction type.

Table 23 shows an example of a joint coding table in which codewords areallocated by taking frequency of occurrence into consideration, assumingthat 2N×2N inter prediction mode has a higher frequency of occurrencethan direct mode.

TABLE 23 PREDICTION MODE PARTITION CODEWORD DIRECT 01 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 1 2N × N  001  N × 2N 0001

Referring to Table 23, a codeword 1, being smaller than a codeword 01allocated to direct mode, is allocated to 2N×2N inter prediction mode,which has a higher frequency of occurrence than direct mode.

Furthermore, Table 24 shows an example in which codewords are allocatedby taking frequency of occurrence into consideration, assuming that 2N×Ninter prediction mode has a lower frequency of occurrence than N×2Ninter prediction mode.

TABLE 24 PREDICTION MODE PARTITION CODEWORD DIRECT 01 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 1 2N × N  0001  N × 2N 001

Referring to Table 24, a codeword 1, being smaller than a codeword 01allocated to direct mode, is allocated to 2N×2N inter prediction modewhich has a higher frequency of occurrence, and a codeword 001 isallocated to N×2N inter prediction mode, being smaller than a codeword0001 allocated to 2N×N inter prediction mode.

In the examples of FIG. 11 and Tables 19 to 24, since merge mode can beapplied in a PU unit, signaling may be performed indicating that mode Ais applied and then whether merge mode is applied to the current blockor not may be signaled (merge_flag). Whether merge mode is applied tothe current block or not may be signaled even when not direct mode, butinter prediction mode is indicated through Tables 19 to 24. Furthermore,when specific merge mode has a high selection ratio, mode A itself maybe set as merge mode.

FIG. 12 is a diagram schematically illustrating another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied. FIG. 12 illustrates an example in whichdirect mode is not applied as prediction mode in which motioninformation of a neighboring block is used as motion information for thecurrent block, that is, {(merge) skip mode, merge mode} is used andmerge mode is applied in a PU unit.

When comparing the embodiment of FIG. 12 with the embodiment of FIG. 9or 11, the number of pieces of information regarding whether predictionmode, in which motion information of a neighboring block is used asmotion information for the current block is applied or not is reduced byone. If direct mode is excluded in the case of FIG. 9 or 10, overheadwhen information on inter/intra prediction modes is signaled can besubsequently reduced.

As in the case where {skip mode, direct mode, merge mode} is used, aprediction type can be signaled even when {(merge) skip mode, mergemode} is used. For example, in the example of FIG. 12, assuming thatprediction mode or a prediction type having a high selection ratio(frequency of occurrence) is mode A from among the prediction typesexcluding (merge) skip mode, information on whether mode A is applied ornot may be signaled (modeA_flag) prior to information on whether otherprediction types, e.g. 2N×2N inter prediction mode, . . . , N×N intraprediction mode are applied. In addition, if mode A is not applied,whether other prediction types, e.g. 2N×2N inter prediction mode, . . ., N×N intra prediction mode, are applied may be signaled through jointcoding.

Table 25 shows an example of a joint coding table in which codewords areallocated to information on a prediction type according to the exampleof FIG. 12. Table 25 illustrates an example in which inter predictionmode can be applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N},for convenience of description.

TABLE 25 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N0001 INTER N × N 001 2N × N  1  N × 2N 01

In the example of Table 25, it is assumed that a prediction type havingthe highest frequency of occurrence from among inter prediction modeshaving the partitions 2N×2N, 2N×N, N×2N, and N×N, that is, mode A, is2N×2N inter prediction mode, for convenience of description.Accordingly, whether 2N×2N inter prediction mode is applied or not issignaled in advance through separate signaling.

In addition to the case where transmission order is determined by takingthe frequency of occurrence of a prediction type into consideration asin the example of FIG. 12, the codewords can be allocated to theprediction types by taking the frequency of occurrence (or selectionratio) into consideration.

Table 26 shows an example of a joint coding table in which codewords areallocated by taking the frequency of occurrence of a prediction typeinto consideration, in a case where {(merge) skip mode, merge mode} isused. Table 26 illustrates an example in which inter prediction mode canbe applied with one of the partitions {2N×2N, 2N×N, N×2N, N×N}, forconvenience of description.

TABLE 26 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N  001  N × 2N 01

In the example of Table 26, it is assumed that N×2N inter predictionmode has a higher frequency of occurrence than 2N×N inter predictionmode. Accordingly, a codeword 01 shorter than a codeword 001 allocatedto 2N×N inter prediction mode is allocated to N×2N inter predictionmode.

Furthermore, even when {(merge) skip mode, merge mode} is used, thefrequency of occurrence of a prediction type can be incorporated intoboth signaling order and the allocation of codewords.

Table 27 shows an example of a joint coding table in which signalingorder is adjusted and codewords are allocated by taking the frequency ofoccurrence of a prediction type into consideration, in a case where{(merge) skip mode, merge mode} is used. Table 27 illustrates an examplein which inter prediction mode can be applied with one of the partitions{2N×2N, 2N×N, N×2N, N×N}, for convenience of description.

TABLE 27 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 0000 N × N0001 INTER N × N 001 2N × N  01  N × 2N 1

In the example of Table 27, it is assumed that 2N×2N inter predictionmode, from among 2N×2N, 2N×N, N×2N, and N×N inter prediction modes, hasthe highest frequency of occurrence and 2N×N inter prediction mode has ahigher frequency of occurrence than N×2N inter prediction mode, forconvenience of description. Accordingly, whether (merge) skip mode,whether merge mode is applied and whether 2N×2N inter prediction mode isapplied can be transmitted through additional signaling. Whether otherprediction types are applied is signaled using the joint coding table ofTable 27. Here, a codeword 1 smaller than a codeword 01 allocated to2N×N inter prediction mode is allocated to N×2N inter prediction modehaving a higher frequency of occurrence than 2N×N inter prediction mode.

In the examples of FIG. 12 and Tables 25 to 27, whether merge mode isapplied to the current block or not may be signaled (merge_flag)separately because merge mode can be applied in a PU unit. For example,after which inter prediction mode/partition is applied to the currentblock is signaled through Tables 25 to 27, whether merge mode is appliedto the current block or not may be signaled. Furthermore, when specificmerge mode has a high selection ratio, mode A itself may be set as mergemode.

Meanwhile, even when merge mode is applied in a PU unit, if {skip mode,direct mode, merge mode} is used, direct mode and merge mode can beintegrated and used as integration mode as described above. Direct modeand merge mode are similar to each other in that motion information isderived from a neighboring block and, unlike skip mode, residualinformation is then transmitted. If integration mode is used, signalingoverhead for information on whether inter/intra prediction modes exceptskip mode and integration mode are applied or not can be reduced. Evenwhen integration mode is applied, signaling order and the allocation ofcodewords may be adjusted as described above.

FIG. 13 is a diagram schematically illustrating yet another example of amethod in which the encoder performs signaling in a system to which thepresent invention is applied. FIG. 13 illustrates an example in whichintegration mode is used, but merge mode is applied in a PU unit.

In the example of FIG. 13, if skip mode is not applied after whetherskip mode is applied or not is signaled, whether a prediction typehaving the highest frequency of occurrence, from among the remainingprediction types, is applied or not is signaled preferentially. That is,in FIG. 13, it is assumed that mode A is a prediction type having thehighest frequency of occurrence, from among the remaining predictiontypes except skip mode. Here, mode A may be integration mode.

To this end, the encoder may signal whether mode A is applied or notwhen skip mode is not applied and may signal that which one of theremaining prediction types will be applied using joint coding(pred_mode_partition_signaling) when mode A is not applied.

Table 28 shows a joint coding table according to the example of FIG. 13.

TABLE 28 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N  01  N × 2N 001

In the examples of FIG. 7 and Table 11, a prediction type having thehighest frequency of occurrence except skip mode is illustrated as beingintegration mode, but this is only an example for convenience ofdescription. The present invention is not limited to the above example.For example, if 2N×2N inter prediction mode has a higher frequency ofoccurrence than integration mode, 2N×2N inter prediction mode may bedetermined as mode A, whether 2N×2N inter prediction mode is applied ornot may be separately signaled in advance, and then whether integrationmode is applied may be signaled using joint coding along with otherprediction types.

Meanwhile, even when integration mode is used, codewords may beallocated by taking the frequency of occurrence (or selection ratio) ofeach prediction type into consideration in addition to the adjustment ofsignaling order.

Table 29 shows an example of a joint coding table in which codewords areallocated by taking the frequency of occurrence of a prediction typeinto consideration, in a case where integration mode is used. Table 29illustrates an example in which inter prediction mode can be appliedwith one of the partitions {2N×2N, 2N×N, N×2N, N×N}, for convenience ofdescription.

TABLE 29 PREDICTION MODE PARTITION CODEWORD INTRA 2N × 2N 00000 N × N00001 INTER N × N 0001 2N × 2N 1 2N × N  001  N × 2N 01

Table 29 illustrates an example in which N×2N inter prediction mode hasa higher frequency of occurrence than 2N×N inter prediction mode.Accordingly, in the example of Table 29, a codeword 01 shorter than acodeword 001 allocated to 2N×N inter prediction mode is allocated toN×2N inter prediction mode.

Even when integration mode is applied, a codeword may be allocated toeach of prediction types including integration mode, and a codewordcorresponding to an applied prediction type may be signaled.

Table 30 schematically shows an example of a joint coding table that isused to send information on a prediction type (e.g., prediction mode anda partition size) applied to the current block by allocating a codewordto each of the prediction types other than skip mode, in a case whereintegration mode is used.

TABLE 30 PREDICTION MODE PARTITION CODEWORD MRG/DIRECT 1 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N  001  N × 2N0001

Table 30 illustrates an example in which inter prediction mode can beapplied with one of the partitions {2N×2N, 2N×N, N×2N, N×N}, forconvenience of description. Referring to Table 30, the encoder canallocate to a codeword each of prediction modes, that is, integrationmode (merge/direct mode), 2N×2N and N×N intra prediction modes, and2N×2N, 2N×N, N×2N, and N×N inter prediction modes and send the codewordof a prediction type applied to the current block.

Here, the encoder may allocate the codewords by taking the frequency ofoccurrence of each prediction type (selection ratio) into consideration.Table 31 shows an example in which codewords are allocated by taking thefrequency of occurrence of each prediction type into consideration inthe example of Table 30.

TABLE 31 PREDICTION MODE PARTITION CODEWORD MRG/DIRECT 1 INTRA 2N × 2N000000 N × N 000001 INTER N × N 00001 2N × 2N 01 2N × N  0001  N × 2N001

In the example of Table 31, it is assumed that N×2N inter predictionmode has a higher frequency of occurrence than 2N×N inter predictionmode, for convenience of description. In the example of Table 31, ascompared with the example of Table 30, a codeword 001 shorter than acodeword 0001 allocated to 2N×N inter prediction mode is allocated toN×2N inter prediction mode.

Meanwhile, in Tables 28 to 31, merge mode is applied in a PU unit.Accordingly, in the case the signaling order is adjusted (i.e. the caseof Table 28, Table 31) or in the case integration mode including mergemode is taken into consideration equivalently with other predictiontypes (i.e. the case of Table 30), whether merge mode is applied or notdoes not need to be signaled separately if inter prediction mode/apartition size other than skip mode and integration mode is applied tothe current block. In contrast, if information on a prediction type issignaled through Table 29, that is, the case where the codewords areallocated by taking frequency of occurrence into consideration withoutadjusting the signaling order, any one of inter-prediction mode and apartition size may be signaled to be applied to the current block andthen information merge_flag on whether merge mode is applied to thecurrent block or not may be signaled.

The cases where only the partitions {2N×2N, 2N×N, N×2N, N×N} are appliedto inter prediction mode have been described so far, for convenience ofdescription, but a prediction type for the current block may be signaledby taking all the partitions for inter mode into consideration.

Table 32 shows an example of a joint coding table that can be used tosignal a prediction block for the current block, in a case where all thepartitions 2N×2N, 2N×N, N×2N, N×N, 2N×nU, 2N×nD, nL×2N, and nR×2N aretaken into account.

TABLE 32 Pred_type PredMode PartMode 0 MODE_INTRA PART_2N × 2N 1MODE_INTRA PART_N × N 0 MODE_INTER PART_2N × 2N 1 MODE_INTER PART_2N × N2 MODE_INTER PART_N × 2N 3 MODE_INTER PART_N × N 4 MODE_INTER PART_2N ×Nu 5 MODE_INTER PART_2N × nD 6 MODE_INTER PART_nL × 2N 7 MODE_INTERPART_nR × 2N 8 MODE_INTRA PART_2N × 2N 9 MODE_INTRA PART_N × N

Referring to Table 32, each partition size of intra prediction mode andeach partition size of inter prediction mode can be signaled using aprediction type. Accordingly, a prediction type for the current blockmay be signaled at once by jointly coding prediction mode and apartition size. Here, as described above, codewords may be allocated bytaking frequency of occurrence into consideration for each predictiontype.

In the example of Table 32, in the case of prediction mode in whichmotion information of a neighboring block is used as motion informationfor the current block without change, for example, in the case of {skipmode, direct mode, merge mode} or {(merge) skip mode, merge mode}, whichmode is applied or not may be inferred based on other conditions orwhich mode is applied or not may have been sent in advance throughseparate signaling. In addition, it is assumed that merge mode isapplied in a PU unit as in other examples in Table 32, and whether mergemode is applied or not can be signaled per partition.

Accordingly, whether merge mode is applied in a CU unit or not may betransferred through separate signaling as in the cases of Tables 17 and32. If merge mode is not applied in a CU unit, whether merge mode isapplied or not may be signaled (merge_flag) per each partition (i.e.,PU) while signaling a prediction type for the current block as in Table32 or after signaling a prediction type for the current block.

Prior to the signaling of each prediction type, pieces of additionalinformation described above, for example, a slice type or information onpartition may be signaled. In this case, the prediction types may bedistinguished from one another based on the pieces of additionalinformation. For example, in the case of an I slice, 2N×2N intraprediction mode may be indicated if the value of a prediction type is 0,and in the case of a B or P slice, 2N×2N inter prediction mode may beindicated if the value of a prediction type is 0.

Furthermore, the prediction types may be distinguished from one anotherby allocating different codewords to prediction types having differentprediction modes/partitions.

Transmission efficiency can be improved by modifying a signaling schemefor prediction mode in an inter slice as described above. For example,prediction mode and a partition type for an inter slice may be jointlycoded into a unary-type codeword. Here, as described above, informationon prediction, such as prediction mode and a partition (size), can becalled a prediction type. The prediction type may further includeinformation on whether partition is performed or not and information ona slice type, etc., in addition to prediction mode and a partition(size).

Codewords indicative of prediction types can be rearranged depending ona portion of each prediction mode, that is, frequency of occurrence (orfrequency of selection).

Prediction mode and a partition type (or a partition size) can betransmitted through a specific syntax element. For example, whether skipmode is applied or not can be signaled through the skip flag skip_flagas described above. Furthermore, whether merge mode is applied or notcan be signaled through the merge flag merge_flag, whether direct modeis applied or not can be signaled through the direct mode flagdirect_flag, and whether integration mode of direct mode and merge modeis applied or not can be signaled through the integration mode flagmerge_direct_flag.

Meanwhile, if prediction modes signaled through specific flags are notapplied to the current block, prediction mode and a partition size forthe current block may be signaled separately.

Table 33 schematically shows an example in which prediction mode and apartition type (or partition size) are signaled in a CU level (or a CUparameter set).

TABLE 33 coding_unit(x0,y0,log2CUSize) { Descriptor   . . . if(slice_type!=I) u(1)|ae(v)   pred_mode   . . .  if(PredMode==MODE_INTER)   inter_partitioning_idc ue(1)|ae(v)   . . . }

In the example of Table 33, the signaling may be performed in such a wayas to jointly code prediction mode and partition information and send acorresponding codeword. Here, as in the example of Table 33, predictionmode and a partition type (or partition size) may be signaled usingseparate syntax elements. In Table 33, prediction mode may be indicatedby pred_mode and the partition size of inter prediction mode may beindicated by inter_partitioning_idc.

Meanwhile, as described above, the signaled syntax element can be namedas pred_mode_partition_signaling since the syntax element includesinformation on prediction mode and partition, and the signaled syntaxelement can be also simply named as pred_type as the informationincluding information on prediction mode and partition mode, etc., isnamed as prediction type. In case of pred_mode_partition_signaling orpred_type, pieces of related information (e.g., prediction mode and apartition size) may be specified in the form of one codeword throughjoint coding and signaled.

Table 34 schematically shows an example of codewords described above.

TABLE 34 PREDICTION MODE PARTITION CODEWORD DIRECT 0 — INTRA 2N × 2N 100000 N × N 1 00001 INTER N × N 1 0001 2N × 2N 1 1 2N × N  1 01  N × 2N1 001

If the signaling order shown in FIG. 3 is used as a signaling method foreach prediction mode, whether skip mode is applied or not, whether mergemode is applied or not, and whether direct mode applied or not can besequentially signaled as described above. If skip mode, merge mode, anddirect mode are not applied, which one of the remaining prediction typesis applied is signaled using joint coding. This has already beendescribed with reference to FIG. 3.

Meanwhile, when taking Table 34 into account, a codeword for eachprediction mode has a different length. In accordance with a sourcecoding theory, the length of each codeword is approximately proportionalto the absolute value of the log value of an occurrence probability.Accordingly, in order to improve coding efficiency, it is better to usethe shortest codeword for the most frequent symbol.

To this end, the codewords of Table 34 can be rearranged withoutincreasing the complexity of encoding/decoding by taking frequency ofoccurrence into consideration for each prediction type in order toimprove coding efficiency.

As an example in which an occurrence probability for each predictiontype (or prediction mode) was measured, the example of FIG. 4 wasdescribed above. In the example of FIG. 4, as described above, 2N×2Ninter prediction mode has a larger portion than direct mode and N×2Ninter prediction mode has a larger portion than 2N×N inter predictionmode for the number of times of occurrence in all the prediction types.Accordingly, the codewords for 2N×2N inter prediction mode and directmode may be switched and the codewords for N×2N inter prediction modeand 2N×N inter prediction mode may be switched depending on frequency ofoccurrence, that is, their portion in the number of times of occurrencein all the prediction types.

Table 35 shows an example in which codewords for each prediction typeshave been rearranged as described above in Table 34.

TABLE 35 PREDICTION MODE PARTITION CODEWORD DIRECT 1 — INTRA 2N × 2N 100000 N × N 1 00001 INTER N × N 1 0001 2N × 2N 0 — 2N × N  1 001  N × 2N1 01

In Tables 34 and 35, a prediction type to be signaled separately isfirst detected by allocating a codeword 0 to the prediction type. Next,what prediction type is applied is indicated at once by allocatingcodewords to the remaining prediction types. This is similar to thefeatures described with reference to FIGS. 5 to 8.

The example of FIG. 3 corresponds to an example in which merge mode isapplied in a CU unit as described above. The examples in which mergemode is applied in a PU unit include the example of FIG. 9. In theexample of FIG. 9, whether merge mode is applied or not may be signaledfor each partition of inter prediction mode as described above.

FIG. 10 shows the portion (i.e., frequency of occurrence) of eachprediction type when merge mode is applied in a PU unit. Even when mergemode is applied in a PU unit as described above, signaling order may beadjusted or codewords may be allocated for each prediction type bytaking frequency of occurrence into consideration. This has already beendescribed with reference to FIGS. 11 to 13.

Meanwhile, FIG. 14 schematically shows an example of a decoding process.Referring to FIG. 14, prediction data may experience a prediction modedecoding process and a process of generating a motion compensation (MC)predictor. Coefficient data may experience a process of decoding thecoefficient data and a process of generating residual data. Next, adecoded image may be finally generated.

FIG. 15 is a diagram illustrating the prediction mode decoding processshowed in FIG. 14. FIG. 15 illustrates an example in which {(merge) skipmode, merge mode} is used as prediction mode in which motion informationof a neighboring block is used as motion information for the currentblock.

For the inter slice, information to be signaled in relation toprediction may include information on partition, information on whetherskip mode is applied or not, information on whether merge mode isapplied or not, and information on which one of the prediction types ofinter prediction mode and intra prediction mode is applied, etc. Theinformation on which one of the prediction types of inter predictionmode and intra prediction mode is applied can be classified into fourtypes 2N×2N, N×N, 2N×N, and N×2N depending on a partition size in thecase of inter prediction mode and can be classified into two types 2N×2Nand N×N depending on a partition size in the case of intra predictionmode. In the case of inter prediction mode, the information on which oneof the prediction types of inter prediction mode and intra predictionmode is applied can be further classified because the partition sizes2N×nU, 2N×nD, nL×2N, and nR×2N may be used additionally as describedabove.

In the prediction mode decoding process, the decoder splits a CUaccording to a split flag partition_flag and then applies skip modeaccording to the skip flag. If skip mode is not applied, the decoderdetermines a prediction type to be applied to the current block based oninformation which indicates the prediction type (e.g.,mode_and_partition). Here, if inter prediction mode is applied, thedecoder may determine whether to apply merge mode or not in a PU unitthrough the merge flag. Furthermore, the partition size N×N may be usedonly when the size of the current CU is a minimum irrespective ofwhether the partition size N×N is inter prediction mode or intraprediction mode.

Here, in order to improve compression efficiency, all prediction typesincluding prediction mode and partition information may be signaledusing joint coding.

FIG. 16 is a diagram schematically illustrating an example of a methodof signaling prediction mode and partition information through jointcoding. Referring to FIG. 16, Table 36 shows an example of a jointcoding table according to the example of FIG. 16 and shows initialcodewords allocated when joint coding is performed.

TABLE 36 INITIAL CODEWORD PREDICTION MODE CU SIZE > MIN CU SIZE = MINSPLIT 1 — SKIP 01 1 MERGE 2N × 2N 001 01 INTER 2N × 2N 0001 001 2N × N 00001 0001  N × 2N 000001 00001 N × N — 0000000 INTRA 2N × 2N 000000000001 N × N — 0000001

Using the table 35 as initial state, the mode selected to ne applied tothe current block is switched (or adapted) with the mode right above theselected mode per each signaling. Accordingly, if a selection ratio forspecific mode (i.e., a prediction type) is increased, a shorter codewordcan be allocated to the specific mode for which the selection ratio hasbeen increased. When a short codeword is allocated to a frequentlyselected mode, compression efficiency can be improved.

This adaptation can be performed independently in the depth of eachblock. In other words, the adaptation can be performed independentlywith specific adaptation depending on the size of a CU.

Here, a compression effect can be further increased by changing a jointcoding range. In the above description, the object of joint coding mayinclude whether partition will be performed, whether skip mode isapplied or not, whether 2N×2N merge mode is applied or not, whether2N×2N inter prediction mode is applied or not, whether 2N×N interprediction mode is applied or not, whether N×2N inter prediction mode isapplied or not, whether N×N inter prediction mode is applied or not,whether 2N×2N intra prediction mode is applied or not, and whether N×Nintra prediction mode is applied or not. In addition, the object ofjoint coding may further include whether 2N×N merge mode is applied ornot, whether N×2N merge mode is applied or not, and whether N×N mergemode is applied or not.

In the signaling method of FIG. 16, compression efficiency is improvedthrough codeword adaptation (or switching) after joint coding. However,a greater amount of information may have to be transmitted because acodeword is switched in the adaptation process as for an element that issignaled with fixed small amount of information when joint coding is notperformed. For example, the information partition_flag on whetherpartition will be performed or not can be processed using the amount ofinformation of 1 bit because signaling of partition_flag is performed atthe front when joint coding is not performed. Even when joint coding isperformed, the smallest amount of information (i.e., the shortestcodeword) can be used as an initial value as in Table 36. If a lot ofskip mode or 2N×2N merge mode is consecutively selected in the codingprocess, the position of information on whether partitioning will beperformed or not (hereinafter referred to as information indicative ofpartition mode, for convenience of description) is pushed back and thusplaced at a position to which a longer codeword is allocated. As aresult, bits can be wasted when partition mode is selected later in theprocess.

FIG. 17 is a diagram schematically illustrating an example of a casewhere bits are wasted because a codeword allocated to partition mode islengthened. Referring to FIG. 17 a codeword 1 is allocated to inpartition mode, at the early stage. When skip mode is selected, however,the positions of skip mode and the positions of partition mode areswitched. When 2N×2N merge mode is selected, the positions of partitionmode and the positions of 2N×2N merge mode are switched. Here, whenpartition mode is selected regarding the current block, the partitionflag partition_flag indicating whether partition mode is applied or notis signaled with a size of 3 bits because a codeword allocated to theposition of partition mode is ‘001’.

To this end, a method of improving compression efficiency by modifying arange of mode in which joint coding is applied can be taken intoconsideration.

Change of a Joint Coding Range

The following methods can be taken into consideration as various methodsof changing a joint coding range.

(1) Whether partition will be performed or not is signaled using a flag,and joint coding can be applied to the remaining modes as describedabove.

(2) Whether partition will be performed or not is signaled using a flag,and joint coding can be applied to the remaining modes by addinginformation or mode to the remaining modes.

(3) Joint coding is applied to partition mode and skip mode, andseparate joint coding can be applied to the remaining modes.

(4) Joint coding is applied to partition mode, skip mode, and mergemode, and separate joint coding can be applied to the remaining modes.Here, merge mode that is jointly coded may be the merge flag merge_flagor may be specific mode, such as 2N×2N merge mode. In addition, if themerge flag is the object of joint coding, when inter prediction mode isselected later, the merge flag can be used to determine whether mergemode is applied or not and when intra prediction mode is selected later,a most probable mode (MPM) flag mpm_flag can be derived or inferred fromthe merge flag and used to determine whether the mpm value is applied ornot.

Meanwhile, a change of the joint coding range may be applied adaptively.For example, the methods of applying joint coding by changing a targetrange can be adaptively applied to units, such asdepth/block/slice/frame/group of picture (GOP). The following methodscan be taken into consideration as examples of a method of adaptivelyapplying a change of joint coding range.

(1) Additional information can be signaled to each application unit ofjoint coding.

(2) Whether a change of joint coding range will be applied or not can bedetermined based on neighbor's information.

(3) Whether a change of joint coding range will be applied or not can bedetermined based on statisticall values. For example, information on aprevious slice/frame can be applied to the current slice/frame. Inanother example, accumulative statistical information on a plurality ofprevious slices/frames can be applied to the current slice/frame, oraccumulative statistical information on some of or all of the blocksdecoded before the current block in the same slice/frame can be appliedto the current slice/frame.

(4) Different joint coding ranges can be applied to a case where a CUsize is a minimum and a case where a CU size is not a minimum.

In addition, a codeword may be changed per each joint coding. Forexample, codewords for the subjects of joint coding can be adaptivelyapplied to units, such as depth/block/slice/frame/GOP. Furthermore, foran adaptive application, a method of signaling additional informationper each application unit, a method of determining whether a change ofjoint coding range will be applied or not based on neighbor'sinformation, or a method of determining whether a change of joint codingrange will be applied or not based on statistical values may be used.

A method of applying information on a previous slice/frame to thecurrent slice/frame, a method of applying accumulative statisticalinformation on a plurality of previous slices/frames to the currentslice/frame, or a method of applying accumulative statisticalinformation on some of or all blocks, decoded before the current blockin the same slice/frame, to the current slice/frame can be used as themethod of determining whether a change of joint coding range will beapplied or not based on statistical values as described above.

Furthermore, even when a codeword is changed for each joint coding,adaptation can be differently applied to a case where a CU size is aminimum and a case where a CU size is not a minimum.

Reset of Adaptation for the Object of Joint Coding

As an alternative to the method of changing a joint coding range, themethod can be considered that joint coding and adaptation for the objectis performed and then the adaptation is stopped per a specific unit andthen initialization (reset) is performed.

Here, any one of the elements of joint coding may be the object of areset, all the elements of joint coding may be the object of a reset, oronly some of a plurality of elements of joint coding may be the objectof a reset.

Furthermore, a reset unit may be a CU or the Largest Coding Unit (LCU).Furthermore, a slice, a frame, or a GOP may be used as a reset unit.

As an example of adaptation reset, a case where the elements of jointcoding which are the object of reset, are partition modes and a resetunit is the LCU can be considered.

The LCU is CU of a maximum size from among CUs, and the depth of the LCUmay be set to 0. Whenever the LCU is divided into four equal parts, thedepth is increased. The LCU can be divided to a specific depth in such amanner that the LCU is recursively divided into several sub-CUs withinthe LCU, that is, an individual sub-CU is again divided into severalsub-CUs.

FIG. 18 is a diagram schematically illustrating an example of adaptationreset in which partition mode is the object of reset and the LCU is areset unit in a system to which the present invention is applied.Referring to FIG. 18, adaptation continues to be performed in an earlystate. For example, when skip mode is selected regarding a first targetblock, partition mode and skip mode can be switched. Next, when 2N×2Nmerge mode is selected regarding a next target block, partition mode and2N×2N merge mode can be switched. Next, when 2N×2N inter prediction modeis selected regarding a next target block, partition mode and 2N×2Ninter prediction mode can be switched. While moving along a block inwhich prediction mode is selected such a way above, partition mode isreset when passed through the boundary of the LCU. Accordingly, theposition of partition mode moves to a position corresponding to acodeword ‘1’, that is, the first position, and the position of each ofthe remaining modes is adjusted downward one rank.

Change of an Adaptation Method

A codeword is currently adapted every signaling for prediction modeaccording to raster scan order. This method can be modified in order toimprove a compression effect.

FIG. 19 is a diagram schematically illustrating a codeword adaptationmethod. FIG. 19( a) schematically shows a method of adapting a codewordaccording to raster scan order as in the existing adaptation method. Inthe example of FIG. 19( a), adaptation results are accumulated, thusinfluencing the coding of a next block.

The coding performance of the current block can be further improved byreferring to a tendency of a neighboring block rather than to a tendencycorresponding to adaptation results that are accumulated according tocircumstances. For a system to which the present invention is applied,in coding of block D as in FIG. 19( b) as in FIG. 19( b), reference canbe made to a tendency of a block A or a block C, that is, tendency of aneighboring block, rather than to a tendency of adaptation results thatare accumulated up to the block C. This is because there is a highprobability that the characteristics of the block D will be similar withthose of the block A or the block C, that is, a neighboring block.

Accordingly, the existing adaptation method can be changed as follows.

(1) Adaptation results are accumulated, but whether adaptation will beperformed or not and an adaptation method can be determined withreference to a neighboring block.

(2) Adaptation results are not accumulated, and whether adaptation willbe performed or not and an adaptation method can be determined withreference to a neighboring block.

(3) Adaptation can be performed with different criteria depending onmode. For example, regarding partition mode, adaptation can be performedwhile accumulating adaptation results. Regarding other modes, adaptationcan be performed with reference to a neighboring block.

(4) Adaptation can be performed according to the same criterion for thesize of a neighboring block and a current block and the type of mode.Here, the degree of adaptation may be changed depending on the number ofneighboring blocks having the same type of mode.

FIG. 20 is a diagram schematically illustrating an example ofneighboring reference blocks for adaptation in a system to which thepresent invention is applied. Neighboring blocks to which reference ismade for adaptation can be set as in the example of FIG. 20.

For example, reference can be selectively made to neighboring blocks inan LCU unit as in FIG. 7( a). For another example, reference can beselectively made to neighboring blocks in a CU unit as in FIG. 7( b).Here, the neighboring blocks can include not only spatial neighboringblocks A, B, C, and D, but also temporal neighboring blocks Col LCU andCol CU.

For another example, reference can be made to neighboring partitions ina partition unit that is further split in a CU.

The LCU or CU may include different types of partitions. Accordingly,when reference is made to a neighboring block, reference can be madeonly to a neighboring block having the same type of CU size orpartition, or alternatively reference can be made irrespective ofwhether a neighboring block has the same type of a CU size or partition.

Furthermore, when reference is made to a neighboring block, the order ofpriority or a ranking weight may be assigned to a neighboring blockdepending on the position of the reference block. For example, in FIG.20, regarding the current LCU or the current CU, reference may be madeto neighboring blocks in such a manner that reference is first made to ablock A and reference is made to a block B if the block A is notavailable.

FIG. 21 is a diagram schematically illustrating an embodiment of amethod of changing adaptation in a system to which the present inventionis applied.

FIG. 21( a) schematically shows an embodiment in which adaptation isapplied in an LCU unit. Accordingly, in the example of FIG. 21( a), aninitial codeword may be adapted to each of prediction partitions thatbelong to LCUs A and B. Here, an adapted codeword mapping table (or ajoint coding table) may be used to code each prediction partition thatbelongs to the current LCU.

FIG. 21( b) also schematically shows an embodiment in which adaptationis applied in an LCU unit. In the example of FIG. 21( b), an initialcodeword is adapted to each of prediction partitions that belong to LCUsA and B, but the adaptation is independently performed according to a CUsize. Accordingly, a plurality of codeword mapping tables is useddepending on a CU size.

In the example of FIG. 21( b), an adapted codeword is used to code eachprediction partition that belongs to the current LCU, but a plurality ofindependently generated codeword mapping tables is used depending on aspecific CU size on which adaptation will be performed. Accordingly,when a CU belonging to the current LCU is coded using a codeword mappingtable, a codeword mapping table determined for each CU size can be used.For example, in the example of FIG. 21( b), a codeword mapping tablewhich is adapted to regions ‘c’ is used for regions ‘a’ having identicalsize with region ‘c’, and a codeword mapping table which is adapted toregions ‘d’ is used for regions ‘b’ having identical size with region‘b’.

Meanwhile, although the signaling methods have been described so far onthe basis of inter prediction mode, signaling can also be performed onintra prediction mode if prediction is performed as can be seen from theabove-described joint coding tables.

FIG. 22 is a diagram schematically illustrating an example of an intraprediction method for the current block. Referring to FIG. 22, as tointra prediction for the current block 2210, intra prediction mode of aleft block 2220 and an above block 2230 can be checked. Here, the mostprobable mode (MPM) of the current block 2210 may be determined assmaller mode from among mode for the left block 2220 and mode for theright block 2230 (MPM=min (an upper intra prediction mode, a left intraprediction mode)).

Next, the encoder may signal a flag indicating whether intra predictionmode for the current block 2210 is the MPM. If the flag is set, intraprediction mode for the current block becomes the MPM. If intraprediction mode for the current block 2210 is not the MPM, the encodersignals information on mode B indicating intra prediction mode for thecurrent block 2210.

If mode B<MPM, mode B is used as intra prediction mode for the currentblock 2210 without change. If mode B≧MPM, mode B+1 is used as intraprediction mode for the current block 2210. This is because a case whereintra prediction mode for the current block 2210 is the MPM does notneed to be taken into consideration because the case has already beensignaled.

If an invalid candidate is included among MPM candidates, the MPM can beinferred as DC prediction mode in a corresponding case. In this case, amethod of determining the MPM without simply inferring the MPM as DCprediction mode can be taken into consideration in order to improvecompression efficiency.

Determining the MPM for a Case where Some of MPM Candidates are Valid

In a existing skills, if an invalid candidate is included in MPMcandidates (e.g., the above block and the left block, etc.), the MPM isdetermined as DC prediction mode as described above. If some of MPMcandidates are valid, however, intra prediction mode for the validcandidates can be used as the MPM of the current block according tocircumstances.

FIG. 23 is a diagram schematically illustrating an example of a methodof determining the MPM when some of MPM candidates are valid in a systemto which the present invention is applied. In the example of FIG. 23, acase where the current block is placed at the boundary of a frame 2310is described.

In the example of FIG. 23, assuming that the current block is A 2320,the above block 2330 of the current block 2320 is not valid, but theleft block 2340 of the current block 2320 is valid. Accordingly, the MPMof the current block 2320 may be set as mode for the left block 2340.

In addition, assuming that the current block is B 2350, the left block2370 of the current block 2350 is not valid, but the above block 2360 ofthe current block 2350 is valid. Accordingly, the MPM of the currentblock 2350 can be set as mode for the above block 2360.

Change of a Method of Determining the MPM

In the existing skills, MPM=min(intra prediction mode for the leftblock, intra prediction mode for the above block) as described above. Amethod of setting minimum mode, from among candidates, as the MPM has aneffect in terms of signaling overhead, but it is difficult to preciselyincorporate intra prediction mode for the current block into the method.

In order to solve this problem, a method of setting the MPM of thecurrent block as the mean of intra prediction mode for the above blockand intra prediction mode for the left block can be taken intoconsideration. Since the MPM has to be derived as an integer value andthe derived MPM has to correspond to intra prediction mode, rounding canbe applied if the mean of intra prediction mode for the above block andintra prediction mode for the left block is not an integer in order toround off or omit a value below the decimal point.

For example, assuming that intra prediction mode for the above block is4 and intra prediction mode for the left block is 8, the MPM of thecurrent block is (4+8)/2, that is, mode 6.

Furthermore, assuming that intra prediction mode for the above block is3 and intra prediction mode for the left block is 6, the MPM of thecurrent block is (3+6)/2, that is, 4.5. The MPM of the current block maybe mode 5 by taking rounding-up and the MPM of the current block may bemode 4 by taking rounding-off.

The change of the method of determining the MPM can also be adaptivelyapplied to each block, slice, or frame.

Extension of an MPM Candidate

As described above, intra-prediction mode for the above block andintra-prediction mode for the left block are used as MPM candidates inthe existing skills. Prediction accuracy can be increased by furtherextending the MPM candidates.

FIG. 24 is a diagram schematically illustrating the extension of an MPMcandidate in a system to which the present invention is applied.Referring to FIG. 24, an MPM candidate for a current block 2400 may beextended to intra prediction mode for a left-above block, intraprediction mode for a right-above block, intra prediction mode for aleft-below block, intra prediction mode for an above block, intraprediction mode for a left block, and intra prediction mode for atemporal neighboring block (col block).

The temporal neighboring block may indicate a block placed at the sameposition as the current block in a frame or slice that has been codedtemporally prior to the current frame or slice.

This extension of the MPM candidate block can be adaptively applied toeach block, slice, or frame.

Extension of an MPM Candidate and Change of a Method of Determining theMPM

When the MPM candidate is extended as described above, a method ofdetermining the MPM may be extended to determine the MPM in variousmanners. For example, the use of at least one of the following methodscan be taken into consideration as a method of determining the MPM.

(1) MPM=mim (MPM candidates). In accordance with this method, minimummode from among MPM candidates can be selected as the MPM of the currentblock.

(2) MPM=average (MPM candidates). In accordance with this method, themean of MPM candidates can be selected as the MPM of the current block.In this case, if the mean of the MPM candidates is not an integer,rounding can be applied as described above.

(3) MPM=median (MPM candidates). In accordance with this method, themedian of MPM candidates can be selected as the MPM of the currentblock.

(4) MPM=most frequent value (MPM candidates). In accordance with thismethod, an MPM candidate that is most frequently selected or generated,from among MPM candidates, can be selected as the MPM of the currentblock.

The change of the method of determining the MPM based on the extendedMPM candidates can be adaptively applied to each block, slice, or frame.

FIG. 25 is a flowchart schematically illustrating an operation of theencoder in a system to which the present invention is applied.

Referring to FIG. 25, the encoder performs prediction on the currentblock in step S2510. The encoder can apply intra prediction or interprediction to the current block. The prediction can be performed bytaking the partition size, and slice type of the current block, etc.into consideration.

The encoder performs entropy coding on the prediction results of thecurrent block in step S2520. A method, such as CABAC or CAVLC, can beused in the entropy coding as described above, and a codeword may beallocated by taking the frequency of occurrence of each prediction modeor prediction type, etc. into consideration.

The encoder signals the entropy coded information in step S2530. Amethod of signaling whether specific prediction mode/prediction type isapplied or not may be utilized by way of additional information, forexample, a flag can be used as a method of signaling the information onprediction mode. A method of concurrently jointly coding elementsincluded in a prediction type and signaling which one of predictionmodes is applied, can be used also as a method of signaling theinformation on prediction mode.

Detailed contents of the method of allocating a codeword by taking thefrequency of occurrence of a prediction type/prediction mode intoconsideration and the method of signaling information on prediction havebeen described above.

FIG. 26 is a diagram schematically illustrating an operation of thedecoder in a system to which the present invention is applied.

Referring to FIG. 26, the decoder receives information from the encoderin step S2610. The information received from the encoder may betransmitted being included in a bitstream. The information includesinformation on the prediction of the current block.

The decoder may extract necessary information by performing entropydecoding on the received information in step S2620. The decoder candetermine what prediction type/prediction mode has been applied to thecurrent block based on the extracted codeword. The extracted codewordmight have been allocated by taking the frequency of occurrence of aprediction type/prediction mode into consideration as described above.Signaling order of the received information might have also beendetermined by taking the frequency of occurrence of a predictionmode/prediction type into consideration. Furthermore, a codewordincluded in the received information on the prediction mode/predictionmay be a codeword allocated by jointly coding elements which form theinformation on the prediction mode/prediction type and corresponed to aprediction mode/prediction type applied to the current block from amongthe codewords. Detailed contents of the information on the predictionmode/prediction type have been described above.

The decoder may perform prediction on the current block in step S2630.The decoder may perform the prediction based on a predictionmode/prediction type that has been determined as the predictionmode/prediction type applied to the current block in a previous step.

The decoder may reconstruct a picture of the current block based on theprediction results in step S2640.

In the above exemplary systems, although the methods have been describedin the form of a series of the steps or blocks, the present invention isnot limited to the sequence of the steps, and some of the steps may beperformed in different order from other or may be performedsimultaneously with other steps. Furthermore, the above-describedembodiments include various forms of examples. Accordingly, the presentinvention should be construed as including all other replacements,modifications, and changes which fall within the scope of the claims.

In the above description relating to the present invention, when thereis reference to one element described as being “connected to” or“coupled with” the other element, the one element may be directlyconnected to the other element or may be coupled with the other element,but it should be understood that a third element may be placed betweenthe two elements. In contrast, when it is said that one element isdescribed as being “directly connected to” or “directly coupled with”the other element, it should be understood that a third element is notplaced between the two elements.

1. A method of signaling video information, comprising: performingprediction on a current block; and signaling information on a predictiontype applied to the current block, wherein signaling the information onthe prediction type comprises jointly coding information elementsforming the information on the prediction type and signaling thejointly-coded information elements.
 2. The method of claim 1, whereinthe information elements comprise information on prediction mode andinformation on a partition size.
 3. The method of claim 2, wherein theinformation elements comprise at least one of information on whether ablock has been partitioned or not and information on a slice type. 4.The method of claim 1, wherein a short codeword is allocated to aprediction type having a high selection ratio by way of joint coding. 5.The method of claim 1, wherein whether a specific prediction type fromamong prediction types which are applicable to the current block isapplied or not is separately signaled using a flag.
 6. The method ofclaim 5, wherein the specific prediction type is skip mode.
 7. Themethod of claim 5, wherein: the specific prediction type comprises skipmode and merge mode, whether the skip mode is applied to the currentblock or not is preferentially signaled, and whether the merge mode isapplied to the current block or not is signaled if an application ofinter prediction mode to the current block is signaled.
 8. The method ofclaim 5, wherein a short codeword is allocated to a prediction typehaving a high selection ratio through the joint coding.
 9. A method ofdecoding video information, comprising: receiving information;performing prediction on a current block based on the receivedinformation; and reconstructing the current block based on theprediction, wherein the received information comprises informationelements which are jointly coded and, and wherein the informationelements form a prediction type applied to the current block.
 10. Themethod of claim 9, wherein the information elements comprise informationon prediction mode and information on a partition size.
 11. The methodof claim 10, wherein the information elements comprise at least one ofinformation on whether a block has been partitioned or not andinformation on a slice type.
 12. The method of claim 9, wherein a shortcodeword is allocated to a prediction type having a high frequency ofoccurrence, from among the prediction types, through the joint coding.13. The method of claim 9, wherein whether a specific prediction typefrom among prediction types which are applicable to the current block isapplied or not is received as separate information using a flag.
 14. Themethod of claim 13, wherein: the specific prediction type comprises askip mode and a merge mode, information indicating whether the skip modeis applied to the current block or not is preferentially received, andinformation indicating the merge mode is applied to the current block ornot is received if an application of inter-prediction mode to thecurrent block is signaled.